22.03.2012, 10:28
pawn Код:
CMD:contract(playerid, params[]) {
new
id;
if(playerVariables[playerid][pMoney] < 50000) {
return SendClientMessage(playerid, COLOR_GREY, "You don't have sufficient funds!");
}
if(playerVariables[playerid][pMoney] >= 50000) {
GetPlayerName(id, szPlayerName, MAX_PLAYER_NAME);
format(szMessage, sizeof(szMessage), "You have contracted %d and been charged $50,000 for the contract.", id);
SendClientMessage(playerid, COLOR_WHITE, szMessage);
playerVariables[playerid][pMoney] -= 50000;
playerVariables[id][pContracted] = 1;
new
stringo[255];
format(stringo, sizeof(stringo), "Somebody has requested a hit on %d. You know what to do.", id);
foreach(Player, x) {
if (playerVariables[x][pGroup] == 10 && playerVariables[x][pGroupRank] >= 3) {
SendClientMessage(x, 0xF0F8FFFF, stringo);
}
}
}
return 1;
}
http://imgur.com/r9QeY,qvYOB