07.10.2012, 20:19
Quote:
CMD:arrest(playerid, params[]) { new rank = arrFaction[playerid][p_iMember] > -1 && arrFaction[playerid][g_iFactionType] == 1, giveplayerid, amount; if(rank < 1) return SendClientMessage(playerid, COLOR_WHITE, "You are not authorized to use this command."); { if(IsAtArrestPoint(playerid)) { if(sscanf(params, "ud", giveplayerid, amount)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /arrest [playerid] [amount]"); if(amount > 30000) { SendClientMessage(playerid, COLOR_WHITE, "The charge cannot be more than $30000!"); } if(amount < 30000) { if(IsPlayerConnected(giveplayerid)) { PlayerInfo[giveplayerid][pArrests]++; GivePlayerMoney(giveplayerid, -amount); SendClientMessage(playerid, COLOR_YELLOW, "You succesfully arrested the suspect, you were awarded $5000 for your hard work."); SetPlayerPos(giveplayerid, 227.6157,110.7703,999.0156); SetPlayerInterior(giveplayerid, 10); SendClientMessage(giveplayerid, COLOR_BLUE, "You were arrested, you are now in jail."); GivePlayerCash(playerid, 5000); } } } else { SendClientMessage(playerid, COLOR_RED, "You are not in range of an arrest point!"); } } return 1; } |