12.01.2010, 12:55
Yes, it had one bug.
But, i suggest you to create some team system to your gamemode (for instance using gTeam).
It would allow you to make many teams easily.
Anyways, heres the fixed one.
But, i suggest you to create some team system to your gamemode (for instance using gTeam).
It would allow you to make many teams easily.
Anyways, heres the fixed one.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/becomecop", cmdtext, true, 10) == 0)
{
if (GetPlayerScore(playerid) <= 600) return SendClientMessage(playerid, 0xFF0000FF, "You need atleast 600 score to become cop!");
new skin = GetPlayerSkin(playerid);
if (skin == 265 || skin == 266 || skin == 267 || skin == 280 || skin == 281 || skin == 286 || skin == 288 || skin == 282 || skin == 283) return SendClientMessage(playerid, 0xFF0000FF, "Error: You are cop already.");
SendClientMessage(playerid, 0xAFAFAFAA, "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;
}