17.07.2012, 12:18
Enjoy!
On top of your script add:
And OnPlayerConnect:
On top of your script add:
pawn Код:
new IsWarned[MAX_PLAYERS] = 0;
pawn Код:
IsWarned[playerid] = 0;
pawn Код:
CMD:gr(playerid, params[])
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, 0xFFFFFFFF, "You are not in the driver seat!");
else if(GetPlayerMoney(playerid) <= 100000) return SendClientMessage(playerid, 0xFFFFFFFF, "You need 100 000$ to get gold rims!");
else if(IsWarned[playerid] == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "Warning: This will remove 100 000$ from you. Type the command again to continue.");
IsWarned[playerid] = 1;
}
else
{
IsWarned[playerid] = 0;
GivePlayerMoney(playerid, -100000);
AddVehicleComponent(GetPlayerVehicleID(playerid),1080);
SendClientMessage(playerid, 0xFFFFFFFF, "You have replaced your rims with gold rims.");
}
return 1;
}