01.06.2012, 12:15
Код:
COMMAND:arrest(playerid, params[]) { if(PlayerInfo[playerid][pCop] == 1) { new targetid; if(!sscanf(params, "u", targetid)) { if(PlayerInfo[targetid][pWanted] >= 1) { new Float:targetX, Float:targetY, Float:targetZ; GetPlayerPos(targetid, targetX, targetY, targetZ); if(IsPlayerInRangeOfPoint(playerid, 5, targetX, targetY, targetZ)) { if(PlayerInfo[targetid][pCuffed] == 1) { if(IsPlayerInRangeOfPoint(playerid, 5, //the pos for the LSPD garage or whatever...)) { SetPlayerPos(targetid, //pos for the jail); //OPTIONAL: SetPlayerColor(targetid, colorForJailedPeople); PlayerInfo[targetid][pJailed] = 1; } } } } } } return 1; }
Good luck!
Also, you need ZCMD, and SSCANF2.