RGZ Gaming Forum


 
AcasaCalendarFAQCautareMembriGrupuriInregistrareConectare

Distribuiţi|

VIP 1.7 - latest version [direct SMA] !!

Vezi subiectul anterior Vezi subiectul urmator In jos
AutorMesaj
Moderator
avatar

Rank: Moderator
Status:
Posturi : 1146
Reputatie : 36
Data de Inscriere : 09/02/2014
Oras : RGZ City
Varsta : 18
MesajSubiect: VIP 1.7 - latest version [direct SMA] !! Mier Iul 30, 2014 10:39 am

.:: Descriere ::.




Cu acest plugin userii care au vip au acces la mai multe iteme !


.:: Instalare ::.


1. Fisierul vip.sma il puneti in addons/amxmodx/scripting
2. Fisierul vip.amxx il puneti in addons/amxmodx/plugins
3. Fisierul buyvip.html il puneti in addons/amxmodx/configs
4. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Code:
vip.amxx

5. Fisierul vips.ini il puneti in addons/amxmodx/configs]

6. Schimbati mapa !

.:: Comenzi chat ::.


  • /vips
  • /vip
  • /vipmenu
  • /buyvip
  • /respawn (doar o data pe runda)

.:: Imagini ::.











.:: Descarcare ::.


[sursa=SMA]
#include < amxmodx >
#include < amxmisc >
#include < fun >
#include < cstrike >
#include < hamsandwich >

new const PLUGIN [] = "VIP System";
new const VERSION [] = "1.7";
new const AUTHOR [] = "Akman [aka lordofnothing/ andreics / Row / BlueGaming/ r3p]";

new bool:VipUse[33];
new bool:SpeedOn[33];
new bool:mespawn[33];
new bool:IsVip[33];

#define is_user_vip(%1) ( IsVip[%1] )

stock set_user_vip(id)
{
IsVip[id] = true;
}

stock remove_user_vip(id)
{
IsVip[id] = false;
}

// This is for Read File
new Array:g_Stroke = Invalid_Array;

public plugin_init ( ) {

register_plugin ( PLUGIN, VERSION, AUTHOR );
RegisterHam(Ham_Spawn, "player", "Hook_Vip_Spawn", 1);

register_clcmd ("say /vipmenu", "VipMenu");
register_clcmd ("say_team /vipmenu", "VipMenu");

register_clcmd("say /vips", "Vips_Online");
register_clcmd("say_team /vips", "Vips_Online");

register_clcmd("say /vip", "Vips_Online");
register_clcmd("say_team /vip", "Vips_Online");

register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );

register_clcmd("say /buyvip", "VipBuy");
register_clcmd("say_team /buyvip", "VipBuy");

register_clcmd("say /respawn","call_respawn");

set_task(60.0,"VIP_msg",0,"",0,"b",0)

register_event("HLTV", "event_new_round", "a", "1=0", "2=0")

}
public call_respawn(id)
{
if(!is_user_alive(id))
{
if(mespawn[id])
{
if(is_user_vip(id))
{
ExecuteHam(Ham_CS_RoundRespawn, id);
MesajColorat(id, "!echipa[VIP] !verdeTe-ai respawnat cu succes !");
mespawn[id] = false;
return PLUGIN_HANDLED


}else{

MesajColorat(id, "!echipa[VIP] !verdeNu esti vip!");
return PLUGIN_HANDLED
}

}else{
MesajColorat(id, "!echipa[VIP] !verdeDeja ai folosit !echipa/respawn !");
return PLUGIN_HANDLED
}

}else{
MesajColorat(id, "!echipa[VIP] !verdeTrebuie sa nu fii in viata ca sa folosesti comanda !echipa/respawn !");
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}

public event_new_round()
{
new Players[32]
new playerCount, i, player
get_players(Players, playerCount, "b")
for (i=0; i<playerCount; i++)
player = Players[i]
mespawn[player] = true;
}

public VIP_msg(id)
{
MesajColorat(id, "!echipa[VIP] !verdePentru a vedea detalii despre vip tasteza in chat !echipa/buyvip");
}

public VipBuy(id)
{
show_motd(id,"addons/amxmodx/configs/buyvip.html");
}

public Vips_Online(id)
{
new iPlayers[ 32 ], iNum, iPlayerId, szName[ 32 ]
get_players( iPlayers, iNum, "ch" )

new iLen, szMessage[ ( sizeof iPlayers ) * charsmax( szName ) ]

iLen = formatex( szMessage, charsmax( szMessage ), "!echipaVIP-uri Online: " )
for( new i; i < iNum; i++ )
{
iPlayerId = iPlayers[ i ]
if( is_user_vip( iPlayerId ) )
{
get_user_name( iPlayerId, szName, 31 )
iLen += formatex( szMessage[ iLen ], charsmax( szMessage ) - iLen, " !verde%s%s", szName, iLen ? "," : "" )
}
}
MesajColorat( id, szMessage )
return PLUGIN_HANDLED
}

public client_putinserver(id)
{
if (!ArraySize(g_Stroke))
{
return PLUGIN_CONTINUE;
}

static Stroke[64], Size = 0;

new name[35]
get_user_name(id, name, 34);


for (Size = 0; Size < ArraySize(g_Stroke); Size++)
{
ArrayGetString(g_Stroke, Size, Stroke, charsmax(Stroke));

if (equal(name, Stroke))
{
set_user_vip(id);

return PLUGIN_HANDLED;
}
}

return PLUGIN_CONTINUE;
}

public client_disconnect(id)
{
remove_user_vip(id);
}


public Hook_Vip_Spawn(id)
{
if(is_user_vip(id))
{

set_task(1.0, "iScoreBoard", id + 6969)

}
VipUse[id] = true;
SpeedOn[id] = false;
}

public iScoreBoard(tID) {

new id = tID - 6969;

message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"));
write_byte(id);
write_byte(4);
message_end();
}

public CurrentWeapon ( id )
{
if(is_user_alive(id) && SpeedOn[id] && is_user_vip(id))
set_user_maxspeed( id, get_user_maxspeed(id) + 50.0 );
}

public VipMenu(id)
{
if(is_user_alive(id))
{
if(VipUse[id])
{
if(is_user_vip(id))
{
ShowMenu(id);
return PLUGIN_HANDLED
}else{
MesajColorat(id, "!echipa[%s] !verdeNu esti VIP !",PLUGIN);
return PLUGIN_HANDLED
}
}else{

MesajColorat(id, "!echipa[%s] !verdeDeja ai folosit vipmenu !",PLUGIN);
return PLUGIN_HANDLED
}
}else{
MesajColorat(id, "!echipa[%s] !verdeTrebuie sa fii in viata ca sa folosesti vipmenu !",PLUGIN);
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}

public ShowMenu ( id ) {

new menu = menu_create ( "VIP Menu:", "MenuGiver" );

menu_additem ( menu, " Packet 10 HE !", "1", ADMIN_ALL );
menu_additem ( menu, " Gravitatie !", "2", ADMIN_ALL );
menu_additem ( menu, " Super Viteza", "3", ADMIN_ALL );
menu_additem ( menu, " Awp", "4", ADMIN_ALL );
menu_additem ( menu, " M4a1","5", ADMIN_ALL );
menu_additem ( menu, " 50 Health", "6", ADMIN_ALL );
menu_additem ( menu, " Deagle", "7", ADMIN_ALL );
menu_additem ( menu, " Ak47", "8", ADMIN_ALL );
menu_additem ( menu, " 5000 $", "9", ADMIN_ALL );

menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
menu_display ( id, menu, 0 );

return 1;
}

public MenuGiver ( id, menu, item ) {

if ( item == MENU_EXIT )
{
return 1;
}

new data [ 6 ], szName [ 64 ];
new access, callback;
new g_Name[33];
get_user_name(id, g_Name, 32);
menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
new key = str_to_num ( data );

switch ( key )
{
case 1:
{
give_item(id, "weapon_hegrenade");
cs_set_user_bpammo( id, CSW_HEGRENADE, 10 )
MesajColorat(0, "!echipa[%s] !verdeJucatorul !echipa%s !verdea ales din meniul de vip : !echipapacket de 10 he-uri !",PLUGIN,g_Name);
VipUse[id] = false;
}

case 2:
{
set_user_gravity(id, 0.7);
MesajColorat(0, "!echipa[%s] !verdeJucatorul !echipa%s !verdea ales din meniul de vip : !echipagravitatie !",PLUGIN,g_Name);
VipUse[id] = false;
}

case 3:
{
MesajColorat(0, "!echipa[%s] !verdeJucatorul !echipa%s !verdea ales din meniul de vip : !echipasuper viteza !",PLUGIN,g_Name);
set_user_maxspeed( id, get_user_maxspeed(id) + 50.0 );
SpeedOn[id] = true;
VipUse[id] = false;
}

case 4:
{
give_item(id, "weapon_awp");
cs_set_user_bpammo(id, CSW_AWP, 1000);
MesajColorat(0, "!echipa[%s] !verdeJucatorul !echipa%s !verdea ales din meniul de vip : !echipaawp !",PLUGIN,g_Name);
VipUse[id] = false;
}

case 5:
{
give_item(id, "weapon_m4a1");
cs_set_user_bpammo(id, CSW_M4A1, 1000);
MesajColorat(0, "!echipa[%s] !verdeJucatorul !echipa%s !verdea ales din meniul de vip : !echipam4a1 !",PLUGIN,g_Name);
VipUse[id] = false;
}

case 6:
{
set_user_health(id, get_user_health(id) + 50);
MesajColorat(0, "!echipa[%s] !verdeJucatorul !echipa%s !verdea ales din meniul de vip : !echipa + 50 hp!",PLUGIN,g_Name);
VipUse[id] = false;
}

case 7:
{
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_DEAGLE, 1000);
MesajColorat(0, "!echipa[%s] !verdeJucatorul !echipa%s !verdea ales din meniul de vip : !echipaDEAGLE !",PLUGIN,g_Name);
VipUse[id] = false;
}

case 8:
{
give_item(id, "weapon_ak47");
cs_set_user_bpammo(id, CSW_AK47, 1000);
MesajColorat(0, "!echipa[%s] !verdeJucatorul !echipa%s !verdea ales din meniul de vip : !echipaak47 !",PLUGIN,g_Name);
VipUse[id] = false;
}
case 9:
{
cs_set_user_money(id, cs_get_user_money(id) + 5000);
MesajColorat(0, "!echipa[%s] !verdeJucatorul !echipa%s !verdea ales din meniul de vip : !echipa5000 $",PLUGIN,g_Name);
VipUse[id] = false;
}



}

menu_destroy ( menu );
return 1;

}

public plugin_cfg()
{
static File = 0, Buffer[64], Location[256];

g_Stroke = ArrayCreate(64 /* maximum length */);

get_localinfo("amxx_configsdir", Location, charsmax(Location));

add(Location, charsmax(Location), "/vips.ini ");

if (!file_exists(Location))
{
File = fopen(Location, "w+" /* write file */);

if (File)
{
fclose(File);
}
}

File = fopen(Location, "rt" /* read file as text */);

if (File)
{
while (!feof(File))
{
fgets(File, Buffer, charsmax(Buffer));

trim(Buffer);

if (!strlen(Buffer) || Buffer[0] == ';')
{
continue;
}

ArrayPushString(g_Stroke, Buffer);
}

fclose(File);
}
}

stock MesajColorat(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!verde", "^4")
replace_all(msg, 190, "!normal", "^1")
replace_all(msg, 190, "!echipa", "^3")

if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}


MANAGER ROMANIAGAMING ZONE
Contact:

  • Yahoo ID: dutaduta24
  • Skype: DragosNecula
  • STEAM: iphon24_eu








© Copyright by RGZ-Agnostic 2014 - All rights reserved.
Sus In jos
Vezi profilul utilizatorului
 Fondator
avatar

Rank: Fondator
Status:
Posturi : 303
Reputatie : 34
Data de Inscriere : 26/07/2014
MesajSubiect: Re: VIP 1.7 - latest version [direct SMA] !! Mier Aug 13, 2014 6:27 am

Evitam spamul

/Lock.


Nu uitati ca pe forum,sunt Administratorsi in acelasi timpFondator
Nu uitati ca pe forum respect regulile la sange si sunt cu ochii pe voi !
Nu uitati ca desi unii ma considerati prietenos regulile sunt reguli si nu fac exceptie pentru nimeni !
Sus In jos
Vezi profilul utilizatorului

VIP 1.7 - latest version [direct SMA] !!

Vezi subiectul anterior Vezi subiectul urmator Sus

Subiecte similare

-
t » Romania Stuntage EvoLution» Stunt < Race > Drift < Dm > Sumo < New Version[2.6] »
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
RGZ Gaming Forum  :: »[RGZ] Gaming :: Counter Strike 1.6 :: Plugin-uri-