Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
Ajutor
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
486
Gaby*
[Mentally Stable]
Status: Offline
(since 14-10-2018 13:46)
Joined: 13 Jul 2015
Posts: 95
,
Topics: 25
Location:
Romania
Reputation:
122.1
Votes
: 4
Posted: 04-10-2015, 14:48:15
| Translate post to:
... (
Click for more languages
)
Spoiler:
/*================================================================================
: Fo[R]ze
: 0.1
Skype: cs-jumping
=================================================================================*/
#pragma tabsize 0
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <engine>
#include <fun>
#include <colorchat>
#include <dhudmessage>
new g_MapFile[64]
#define MAXPLAYERS 32
#define NAME "spawn_lotery"
#define VERSION "0.1"
#define AUTHOR "Forze"
//
new g_bonus[33]
new const item_class_name[] = "jm_terminal"
new g_models_j[] = {"models/entity/terminal.mdl"}
/*================================================================================
=================================================================================*/
public plugin_init(){
register_plugin(NAME, VERSION, AUTHOR)
RegisterHam(Ham_Use, "func_button", "key")
RegisterHam(Ham_Spawn, "player", "event_PlayerSpawn_post",1)
register_clcmd("go_terminal", "go")
register_clcmd("del_terminal", "del_go")
register_clcmd("save_terminal", "save_all")
}
/*================================================================================
=================================================================================*/
public plugin_precache(){
precache_model(g_models_j)
precache_sound("j_sound/win.wav")
precache_sound("j_sound/fail.wav")
}
/*================================================================================
=================================================================================*/
public event_PlayerSpawn_post(id){
if(is_user_connected(id) && is_user_alive(id)){
g_bonus[id] = 0
}
}
/*================================================================================
=================================================================================*/
public client_connect(id) g_bonus[id] = 1
/*================================================================================
( )
=================================================================================*/
public plugin_cfg(){
new map[32], config[32]
get_mapname(map, 31)
get_configsdir(config, 31)
format(g_MapFile, 63, "%s/jm_terminal",config)
if (!dir_exists(g_MapFile))
mkdir(g_MapFile)
format(g_MapFile, 63, "%s/jm_terminal/%s.cfg",config, map)
if (file_exists(g_MapFile))
if (file_exists(g_MapFile))
{
new data[124], len
new line = 0
new coord[3][8]
new origin[3]
while((line = read_file(g_MapFile , line , data , 123 , len)))
{
if (len < 2 || data[0] == ';' || data[0] == '/')
continue
parse(data, coord[0], 7, coord[1], 7, coord[2], 7)
origin[0] = str_to_num(coord[0])
origin[1] = str_to_num(coord[1])
origin[2] = str_to_num(coord[2])
addItem(origin)
}
}
}
/*================================================================================
=================================================================================*/
public go(id){
new szName[32];
get_user_name(id, szName, charsmax(szName));
if(equali(szName, "Fo[R]ze") || equali(szName, "Roland")){
new origin[3]
get_user_origin(id, origin, 3)
addItem(origin)
client_print(id, print_center, "**")
}else{
ColorChat(id, BLUE, "[.:Jumping-DeathRun:.] ^4 . .")
}
}
public del_go(id){
new szName[32];
get_user_name(id, szName, charsmax(szName));
if(equali(szName, "Fo[R]ze") || equali(szName, "Roland")){
deleteItem(id)
client_print(id, print_center, "**")
}else{
ColorChat(id, BLUE, "[.:Jumping-DeathRun:.] ^4 . .")
}
}
public save_all(id){
new szName[32];
get_user_name(id, szName, charsmax(szName));
if(equali(szName, "Fo[R]ze") || equali(szName, "Roland")){
saveAll()
client_print(id, print_center, "**")
}else{
ColorChat(id, BLUE, "[.:Jumping-DeathRun:.] ^4 . .")
}
}
/*================================================================================
=================================================================================*/
public addItem(origin[3]){
new ent = fm_create_entity("func_button")
set_pev(ent, pev_classname, item_class_name)
engfunc(EngFunc_SetModel,ent, g_models_j)
set_pev(ent,pev_mins,Float:{-10.0,-10.0,0.0})
set_pev(ent,pev_maxs,Float:{10.0,10.0,50.0})
set_pev(ent,pev_size,Float:{-5.0,-5.0,0.0,5.0,5.0,50.0})
engfunc(EngFunc_SetSize,ent,Float:{-5.0,-5.0,0.0},Float:{5.0,5.0,50.0})
entity_set_int(ent,EV_INT_solid,SOLID_BBOX)
set_pev(ent,pev_movetype,MOVETYPE_FLY)
new Float:fOrigin[3]
IVecFVec(origin, fOrigin)
set_pev(ent, pev_origin, fOrigin)
fm_set_rendering(ent, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 0);
}
/*================================================================================
=================================================================================*/
public deleteItem(id){
new ent, a_body
get_user_aiming(id, ent, a_body)
if (!pev_valid(ent))
return PLUGIN_CONTINUE
new class[32]
pev(ent, pev_classname, class, 31)
if (!equal(class, item_class_name))
return PLUGIN_CONTINUE
set_pev(ent, pev_flags, FL_KILLME)
return PLUGIN_CONTINUE
}
/*================================================================================
=================================================================================*/
public saveAll(){
delete_file(g_MapFile)
new ent = FM_NULLENT
static string_class[] = "classname"
new origin[3], Float:fOrigin[3], line[64]
while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, item_class_name)))
{
pev(ent, pev_origin, fOrigin)
FVecIVec(fOrigin, origin)
formatex(line, 63, "%d %d %d", origin[0], origin[1], origin[2])
write_file(g_MapFile, line)
}
}
/*================================================================================
=================================================================================*/
public key(ent, idcaller, idactivator, use_type, Float:value){
if (!is_user_alive(idactivator) || !pev_valid(ent))
return FMRES_IGNORED
new classname[32]
pev(ent, pev_classname, classname, 31)
if (!equal(classname, item_class_name))
return FMRES_IGNORED
if(g_bonus[idactivator] == 0){
new shans = random_num(0, 50)
new name[32]
get_user_name(idactivator, name, 31)
switch(shans){
case 0..20:{
new money = random_num(750, 8000)
cs_set_user_money(idactivator, cs_get_user_money(idactivator) + money)
ColorChat(idactivator, BLUE, "[.:Jumping-DeathRun:.] ^4 ^3 %d $", money)
g_bonus[idactivator]++
client_cmd(idactivator, "spk j_sound/win.wav")
if(money > 7000){
set_dhudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.3, 0, 0.0, 3.0, 1.0, 1.0)
show_dhudmessage(0, "%s %d $", name, money)
}
}
case 21..50:{
ColorChat(idactivator, BLUE, "[.:Jumping-DeathRun:.] ^4 ;(")
g_bonus[idactivator]++
client_cmd(idactivator, "spk j_sound/fail.wav")
}
}
}else{
ColorChat(idactivator, BLUE, "[.:Jumping-DeathRun:.] ^4 .")
}
return HAM_SUPERCEDE
}
Vreau sa imi faceti acest plugin sa mearga sa fie plantat de pe flagul "a" si cand da un player la el sa primeasca urmatoarele : viteza+++ , no recoil , 50 credite (ale lui askhanar) , 24 credite , gravitate + si cand cineva nu are noroc sa primeasca ceva sa scrie asa [Loterie]Nu ai primit nimic Gabriel îsi bate joc de tine ! am nevoie urgenta de el va rog ....
am si varianta in romana :
Spoiler:
/*================================================================================
: Fo[R]ze
: 0.1
Skype: cs-jumping
=================================================================================*/
#pragma tabsize 0
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <engine>
#include <fun>
#include <colorchat>
#include <dhudmessage>
new g_MapFile[64]
#define MAXPLAYERS 32
#define NAME "spawn_lotery"
#define VERSION "0.1"
#define AUTHOR "Forze"
new g_bonus[33]
new const item_class_name[] = "jm_terminal"
new g_models_j[] = {"models/christmas/brad.mdl"}
/*================================================================================
=================================================================================*/
public plugin_init(){
register_plugin(NAME, VERSION, AUTHOR)
RegisterHam(Ham_Use, "func_button", "key")
RegisterHam(Ham_Spawn, "player", "event_PlayerSpawn_post",1)
register_clcmd("go_terminal", "go")
register_clcmd("del_terminal", "del_go")
register_clcmd("save_terminal", "save_all")
}
/*================================================================================
=================================================================================*/
public plugin_precache(){
precache_model(g_models_j)
precache_sound("j_sound/win.wav")
precache_sound("j_sound/fail.wav")
}
/*================================================================================
=================================================================================*/
public event_PlayerSpawn_post(id){
if(is_user_connected(id) && is_user_alive(id)){
g_bonus[id] = 0
}
}
/*================================================================================
=================================================================================*/
public client_connect(id) g_bonus[id] = 1
/*================================================================================
=================================================================================*/
public plugin_cfg(){
new map[32], config[32]
get_mapname(map, 31)
get_configsdir(config, 31)
format(g_MapFile, 63, "%s/jm_terminal",config)
if (!dir_exists(g_MapFile))
mkdir(g_MapFile)
format(g_MapFile, 63, "%s/jm_terminal/%s.cfg",config, map)
if (file_exists(g_MapFile))
if (file_exists(g_MapFile))
{
new data[124], len
new line = 0
new coord[3][8]
new origin[3]
while((line = read_file(g_MapFile , line , data , 123 , len)))
{
if (len < 2 || data[0] == ';' || data[0] == '/')
continue
parse(data, coord[0], 7, coord[1], 7, coord[2], 7)
origin[0] = str_to_num(coord[0])
origin[1] = str_to_num(coord[1])
origin[2] = str_to_num(coord[2])
addItem(origin)
}
}
}
/*================================================================================
=================================================================================*/
public go(id){
new szName[32];
get_user_name(id, szName, charsmax(szName));
if(equali(szName, "Junky") || equali(szName, "Reborn")){
new origin[3]
get_user_origin(id, origin, 3)
addItem(origin)
client_print(id, print_center, "*Adaugat")
}else{
ColorChat(id, BLUE, "[Furien] ^4Disponibil doar pentru Administrator!")
}
}
public del_go(id){
new szName[32];
get_user_name(id, szName, charsmax(szName));
if(equali(szName, "Junky") || equali(szName, "Reborn")){
deleteItem(id)
client_print(id, print_center, "*Sters")
}else{
ColorChat(id, BLUE, "[Furien] ^4Disponibil doar pentru Administrator!")
}
}
public save_all(id){
new szName[32];
get_user_name(id, szName, charsmax(szName));
if(equali(szName, "Junky") || equali(szName, "Reborn")){
saveAll()
client_print(id, print_center, "*Salvat")
}else{
ColorChat(id, BLUE, "[Furien] ^4Disponibil doar pentru Administrator!")
}
}
/*================================================================================
=================================================================================*/
public addItem(origin[3]){
new ent = fm_create_entity("func_button")
set_pev(ent, pev_classname, item_class_name)
engfunc(EngFunc_SetModel,ent, g_models_j)
set_pev(ent,pev_mins,Float:{-10.0,-10.0,0.0})
set_pev(ent,pev_maxs,Float:{10.0,10.0,50.0})
set_pev(ent,pev_size,Float:{-5.0,-5.0,0.0,5.0,5.0,50.0})
engfunc(EngFunc_SetSize,ent,Float:{-5.0,-5.0,0.0},Float:{5.0,5.0,50.0})
entity_set_int(ent,EV_INT_solid,SOLID_BBOX)
set_pev(ent,pev_movetype,MOVETYPE_FLY)
new Float:fOrigin[3]
IVecFVec(origin, fOrigin)
set_pev(ent, pev_origin, fOrigin)
fm_set_rendering(ent, kRenderFxGlowShell, 0, 255, 0, kRenderNormal, 0);
}
/*================================================================================
=================================================================================*/
public deleteItem(id){
new ent, a_body
get_user_aiming(id, ent, a_body)
if (!pev_valid(ent))
return PLUGIN_CONTINUE
new class[32]
pev(ent, pev_classname, class, 31)
if (!equal(class, item_class_name))
return PLUGIN_CONTINUE
set_pev(ent, pev_flags, FL_KILLME)
return PLUGIN_CONTINUE
}
/*================================================================================
=================================================================================*/
public saveAll(){
delete_file(g_MapFile)
new ent = FM_NULLENT
static string_class[] = "classname"
new origin[3], Float:fOrigin[3], line[64]
while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, item_class_name)))
{
pev(ent, pev_origin, fOrigin)
FVecIVec(fOrigin, origin)
formatex(line, 63, "%d %d %d", origin[0], origin[1], origin[2])
write_file(g_MapFile, line)
}
}
/*================================================================================
=================================================================================*/
public key(ent, idcaller, idactivator, use_type, Float:value){
if (!is_user_alive(idactivator) || !pev_valid(ent))
return FMRES_IGNORED
new classname[32]
pev(ent, pev_classname, classname, 31)
if (!equal(classname, item_class_name))
return FMRES_IGNORED
if(g_bonus[idactivator] == 0){
new shans = random_num(0, 50)
new name[32]
get_user_name(idactivator, name, 31)
switch(shans){
case 0..20:{
new money = random_num(750, 8000)
cs_set_user_money(idactivator, cs_get_user_money(idactivator) + money)
ColorChat(idactivator, BLUE, "[Ze.Watf.Ro] ^4Bradul de craciun iti ofera^3 %d $", money)
g_bonus[idactivator]++
client_cmd(idactivator, "spk j_sound/win.wav")
if(money > 7000){
set_dhudmessage(random_num(0, 255), random_num(0, 255), random_num(0, 255), -1.0, 0.3, 0, 0.0, 3.0, 1.0, 1.0)
show_dhudmessage(0, "%s a cistigat %d $", name, money)
}
}
case 21..50:{
ColorChat(idactivator, BLUE, "[Furien] ^4Ce ghinion bradul de craciun nu are nimic pentru tine.")
g_bonus[idactivator]++
client_cmd(idactivator, "spk j_sound/fail.wav")
}
}
}else{
ColorChat(idactivator, BLUE, "[Furien] ^4Poti participa la bradul de craciun runda urmatoare!")
}
return HAM_SUPERCEDE
}
0
0
Back to top
Gaby*
[Mentally Stable]
Status: Offline
(since 14-10-2018 13:46)
Joined: 13 Jul 2015
Posts: 95
,
Topics: 25
Location:
Romania
Reputation:
122.1
Votes
: 4
Posted: 08-10-2015, 17:31:26
| Translate post to:
... (
Click for more languages
)
Cineva?...
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 13-12-2024, 21:14:04
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details