CMD:arrest(playerid,params[])
{
new time,reason[100],str1[256];
new str[256];
if(PInfo[playerid][pCop] >= 3)
if(sscanf(params,"dds",id,time,reason)) return SendClientMessage(playerid, COLOR_GREY, "-- Server: {USAGE} /arrest <playerid> <time> <reason>");
if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREY, "-- Server: {ERROR} Player is not connected.");
if(IsPlayerInRangeOfPoint(playerid,3.0,268.3070,77.8721,1001.0391,359.2793))
format(str, sizeof(str), "Officer %s has arrested %s for %d minutes; RP Reason: %s",PlayerName(playerid), PlayerName(id), time, reason);
SendClientMessageToAll(COLOR_GREY,str);
SetPlayerInterior(id, 6);
SetPlayerVirtualWorld(id, 0);
SetPlayerFacingAngle(id, 360.0);
SetPlayerPos(id,264.3290,82.2896,1001.0391);
SetPlayerHealth(id, 100.0);
ResetPlayerWeapons(id);
SetTimerEx("Unjail",time*60000, false, "i", id);
return 1;
}
if( GetPlayerSkin (playerid) == id) {
if(GetPlayerSkin (playerid) == 4 || GetPlayerSkin (playerid) == 5)
Add to the conditional statement a another check by seperating each conditional statement with || or &&
like so pawn Код:
|| is OR && is AND So when you use skin==4 || skin==5 it means if the skin equals to 4 or skin equals to 5 then do this using && instead of || will change the condition from OR to AND you can add as many conditions as you want as long as you seperate them by the OR || gate or AND && gate |