18.03.2011, 19:32
Hey guys
so I got this command
and up at the GM
and up at the GM
AND NOTHING IS ******* working
so I got this command
Код:
if(strcmp(cmd,"/jail",true) == 0) { if(PlayerInfo[playerid][pAdminLevel] < 1) { SendClientMessage(playerid,COLOR_AFOR,"You are not authorized to use this command"); } if(PlayerInfo[playerid][pAdminLevel] > 0) { new tmp[256],tmp2[256],victim,admin[MAX_PLAYER_NAME],victimname[MAX_PLAYER_NAME],string[256]; tmp = strtok(cmdtext, idx); tmp2 = strtok(cmdtext, idx); if(strlen(tmp) == 0) return SendClientMessage(playerid,COLOR_RED,"Usage : /jail [PLAYERID][TIME]"); if(strlen(tmp2) == 0) return SendClientMessage(playerid,COLOR_RED,"Usage : /jail [PLAYERID][TIME]"); victim = strval(tmp); SetTimerEx("AdminJail", strval(tmp2), false, "i", playerid); GetPlayerName(playerid,admin,sizeof(admin)); format(string,sizeof(string),"You have been jailed for %i by admin %s.",strval(tmp2),admin); SendClientMessage(victim,COLOR_ADMINS,string); GetPlayerName(victim,victimname,sizeof(victimname)); format(string,sizeof(string),"You have put %s in jail for %i.",victimname,strval(tmp2)); SendClientMessage(playerid,COLOR_ADMINS,string); new RandomPos = random(3); switch(RandomPos) { case 0: { SetPlayerPos(victim,262.9509,77.4370,1001.0391); SetPlayerInterior(playerid,6); } case 1: { SetPlayerPos(victim,264.1004,76.5202,1001.0391); SetPlayerInterior(playerid,6); } case 2: { SetPlayerPos(victim,264.9439,78.4224,1001.0391); SetPlayerInterior(playerid,6); } } } return 1; }
Код:
forward AdminJail(playerid);
Код:
public AdminJail(playerid) { SetPlayerPos(playerid,1555.2797851563,-1675.5520019531,16.716053009033); SetPlayerInterior(playerid,0); SendClientMessage(playerid,COLOR_AFOR,"You have been released from the jail!"); }