11.01.2010, 17:39
You should do it like this:
Before Main:
Just ask if you got another questions.
Before Main:
pawn Код:
new CopSkins[] = {265, 266, 267, 280, 281, 286, 288, 282, 283};
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/becomecop", cmdtext, true, 10) == 0)
{
if (GetPlayerScore(playerid) <= 600) return SendClientMessage(playerid, 0xFFFFFFFF, "You need atleast 600 score to become cop!");
if (GetPlayerSkin(playerid) == CopSkins[playerid]) return SendClientMessage(playerid, 0xFFFFFFFF, "You are cop already!");
SendClientMessage(playerid,0xFFFFFFFF,"You Are Now Cop!");
new rand = random(sizeof(CopSkins));
SetPlayerSkin(playerid, CopSkins[rand]);
GivePlayerWeapon(playerid, 22, 100);
GivePlayerWeapon(playerid, 3, 1);
SetPlayerColor(playerid,0xFFFFFFFF);
return 1;
}
return 0;
}