[Help] Unjail
#1

Hi guys
Trying to make a /unjail command for the Police it works fine well but everyone can use it even tho i setted it to only faction 1 (Police)
thanks.

Код:
if(strcmp(cmd, "/unjail",true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
	        {

	        }
	        tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /unjail [playerid/PartOfName]");
				return 1;
			}
			giveplayerid = ReturnUser(tmp);
			if(IsPlayerConnected(giveplayerid))
			{
			    if(giveplayerid != INVALID_PLAYER_ID)
			    {
			        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
					GetPlayerName(playerid, sendername, sizeof(sendername));
					SendClientMessage(giveplayerid, COLOR_BLUE, string);
					SetPlayerPos(giveplayerid, 1551.0023,-1675.6843,15.6575);
					format(string, 256, "[Police] %s has been un-prisoned by Officer %s.", giveplayer, sendername);
					ABroadCast(COLOR_BLUE,string,1);
				}
			}
	    }
	    return 1;
	}
Reply


Messages In This Thread
[Help] Unjail - by NotoriousMOB - 16.11.2010, 17:42
Re: [Help] Unjail - by TyreXel - 16.11.2010, 17:47
Re: [Help] Unjail - by Sinner - 16.11.2010, 17:48
Re: [Help] Unjail - by NotoriousMOB - 16.11.2010, 17:55

Forum Jump:


Users browsing this thread: 3 Guest(s)