21.05.2016, 16:33
hello, I am a beginner trying to learn how to script.
I made two commands, /gun and /aod.
/gun still gives you weapons even though you are not logged in with rcon, and /aod crashes my server client.
/gun:
/aod:
- trying to make an admin on duty command
SPH = SetPlayerHealth
SCM = SendClientMessage
pid = playerid
I made two commands, /gun and /aod.
/gun still gives you weapons even though you are not logged in with rcon, and /aod crashes my server client.
/gun:
Код:
CMD:gun(pid,params[])
{
if(IsPlayerAdmin(playerid))
GivePlayerWeapon(pid, 38, 6000);
GivePlayerWeapon(pid, 24, 6000);
GivePlayerWeapon(pid, 4, 1);
SCM(pid, COLOR_LIGHTBLUE, " You have been granted admin weapons.");
if(!IsPlayerAdmin(playerid))
SCM(pid, COLOR_RED, ADMIN_MESSAGE);
return 1;
}
/aod:
Код:
CMD:aod(pid, params[])
{
if(!IsPlayerAdmin(playerid))
SCM(pid, COLOR_RED, ADMIN_MESSAGE);
if(IsPlayerAdmin(playerid))
SPH(pid, 400);
SetPlayerArmour(pid, 100);
SCMToAll(COLOR_LIME, "Admin %s is now on duty. /w him for help.");
return 1;
}
SPH = SetPlayerHealth
SCM = SendClientMessage
pid = playerid

