[HELP]: Commands
#8

Try This
Код:
CMD:slap(playerid,params[])
{
    new string[128];
    new ID;
    if(sscanf(params,"ui",ID))
	{
	    SendClientMessage(playerid,COLOR_ERROR,"USAGE: /slap (Player Name/ID)");
	    return 1;
	}
	if(!IsPlayerConnected(ID))
	{
	    format(string,sizeof(string),"The player ID (%d) is not connected to the server. You cannot give them Regular Player status.",ID);
	    SendClientMessage(playerid,COLOR_ERROR,string);
	    return 1;
	}
	if(IsKidnapped[playerid] == 1)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"You are kidnapped. You cannot use this command.");
	    return 1;
	}
	if(IsKidnapped[ID] == 1)
	{
	    SendClientMessage(playerid,COLOR_ERROR,"This player is kidnapped. You cannot use this command.");
	    return 1;
	}
	if(!IsPlayerConnected(ID))
	{
		format(string,sizeof(string),"The Player ID (%d) is not connected to the server. You cannot cure them.",ID);
		SendClientMessage(playerid,COLOR_ERROR,string);
		return 1;
	}
	new Float:x,Float:y,Float:z;
	GetPlayerPos(ID,x,y,z);

	SetPlayerPos(ID,x,y,z+30);
	SendClientMessage(ID,COLOR_DEADCONNECT,"[[_Slaped_]]");
	format(string,sizeof(string),"[ADMIN ACTION]You have been slaped by %s(%d)",PlayerName(playerid),playerid);
	SendClientMessage(ID,COLOR_ADMIN,string);

	format(string,sizeof(string),"[ADMIN ACTION]You have Slaped %s(%d).",PlayerName(ID),ID);
	SendClientMessage(playerid,COLOR_ADMIN,string);

	format(string,sizeof(string),"3[ADMIN ACTION] %s(%d) has been slaped by %s(%d).",PlayerName(ID),ID,PlayerName(playerid),playerid);
	IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
	return 1;
}
+REP IF HELPED
Reply


Messages In This Thread
[HELP]: Commands - by Areax - 01.11.2013, 20:45
Re: [HELP]: Commands - by zT KiNgKoNg - 01.11.2013, 20:48
Re: [HELP]: Commands - by Konstantinos - 01.11.2013, 20:48
Re: [HELP]: Commands - by Areax - 01.11.2013, 20:51
Re: [HELP]: Commands - by Areax - 01.11.2013, 21:41
Re: [HELP]: Commands - by DaniceMcHarley - 01.11.2013, 21:47
Re: [HELP]: Commands - by Konstantinos - 02.11.2013, 10:02
Re: [HELP]: Commands - by Ghazal - 02.11.2013, 10:53

Forum Jump:


Users browsing this thread: 1 Guest(s)