Commands not working properly
#1

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:
Код:
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;
}
- trying to make an admin on duty command

SPH = SetPlayerHealth
SCM = SendClientMessage
pid = playerid
Reply


Messages In This Thread
Commands not working properly - by JXF - 21.05.2016, 16:33
Re: Commands not working properly - by justjamie - 21.05.2016, 16:36
Re: Commands not working properly - by Stinged - 21.05.2016, 16:37
Re: Commands not working properly - by Konstantinos - 21.05.2016, 16:41
Re: Commands not working properly - by JXF - 21.05.2016, 17:35
Re: Commands not working properly - by Konstantinos - 21.05.2016, 19:55
Re: Commands not working properly - by JXF - 21.05.2016, 20:27
Re: Commands not working properly - by Konstantinos - 21.05.2016, 20:32
Re: Commands not working properly - by JXF - 21.05.2016, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)