17.11.2011, 22:08
Se quiser :
ZCMD + sscanf
ZCMD + sscanf
PHP код:
CMD:pintar(playerid, params[])
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Antes vocк precisa de um veiculo.");
new Corez[2];
if(sscanf(params, "ii", Corez[0], Corez[1])) return SendClientMessage(playerid, -1, " [Erro] Use /pintar [Cor1][Cor2]");
if(Corez[0] < 0 || Corez[0] > 126) return SendClientMessage(playerid, -1, "Cores de 0 a 126!");
if(Corez[1] < 0 || Corez[1] > 126) return SendClientMessage(playerid, -1, "Cores de 0 a 126!");
ChangeVehicleColor(GetPlayerVehicleID(playerid), Corez[0], Corez[1]);
SendClientMessage(playerid, -1, "Cores do carros modificadas!");
return true;
}