11.03.2014, 14:47
Top of Script after Includes
OnPlayerConnect(playerid) // add this
add this with your other commands
didn't add that admin's on duty this can make hackers stop hack or be careful
i don't know how to use strcmp cmds i use zcmd
And Compile It or it will not work tell me errors in Pm
Код:
new oldskin[MAX_PLAYERS]; // using this aduty can make many things new aduty[MAX_PLAYERS]; #define SCM SendClientMessage // IS FAST and Short :D #define COLOR_HOTPINK 0xFF00FFFF
Код:
aduty[playerid] =0; oldskin[playerid] =0;
Код:
if(strcmp(cmd, "/aduty", true) == 0) { if(PlayerInfo[playerid][pAdmin] < 2) return //any message u want to send if user is not admin if(aduty[playerid] == 0) { new Float:dutyhp; new Float:dutyarmour; pDutyHealth[playerid] = GetPlayerHealth(playerid, dutyhp); pDutyArmour[playerid] = GetPlayerArmour(playerid, dutyarmour); SCM(playerid, COLOR_HOTPINK,"* You Have Gone On Duty."); SetPlayerArmour(playerid, 9999999999); // Make 99999999 and it's infinite ammo SetPlayerHealth(playerid, 999999); GivePlayerWeapon(playerid, 38, 9999999); //oldskin[playerid] = GetPlayerSkin(playerid); //SetPlayerSkin(playerid, 294); // will set the user to wozie skin aduty[playerid] =1; } else { SCM(playerid, COLOR_HOTPINK,"* You Have Gone Off Duty."); SetPlayerHealth(playerid, pDutyHealth[playerid]); SetPlayerArmour(playerid, pDutyArmour[playerid]); SetPlayerHealth(playerid, 100); SetPlayerArmour(playerid, 100); ResetPlayerWeapons(playerid); SetPlayerSkin(playerid, oldskin[playerid]); aduty[playerid] =0; //oldskin[playerid] =0; // will bring the admin back to skin if used GivePlayerWeapon(playerid, 9, 99999); GivePlayerWeapon(playerid, 14, 99999); GivePlayerWeapon(playerid, 16, 99999); GivePlayerWeapon(playerid, 24, 99999); GivePlayerWeapon(playerid, 26, 99999); GivePlayerWeapon(playerid, 28, 99999); GivePlayerWeapon(playerid, 31, 99999); GivePlayerWeapon(playerid, 26, 99999); GivePlayerWeapon(playerid, 34, 99999); GivePlayerWeapon(playerid, 38, 99999); GivePlayerWeapon(playerid, 46, 99999); } return 1; }
i don't know how to use strcmp cmds i use zcmd
And Compile It or it will not work tell me errors in Pm