23.08.2017, 04:36
Код:
YCMD:setcontract(playerid, params[], help) { new user, price; new faction = GetPVarInt(playerid, "Faction"); if(getFactionType(faction) != EFactionType_Hitman || GetPVarInt(playerid, "Rank") < 2) { SendClientMessage(playerid, X11_TOMATO_2, "You aren't a member of hitman!"); return 1; } if(!sscanf(params, "k<playerLookup>d",user,price)) { if(!IsPlayerConnectEx(user)) { SendClientMessage(playerid, X11_TOMATO_2, "User not found"); return 1; } SetPVarInt(user, "Contract", price); if(price != 0) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Contract Updated!"); } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "* Contract Removed!"); } } else { SendClientMessage(playerid, X11_WHITE, "USAGE: /setcontract [user] [price]"); } return 1; }