23.12.2011, 22:44
Veja se funciona ai..
pawn Код:
if(!strcmp(cmdtext, "/corveh", true)){
{
new tmp[24], idx; tmp = strtok(params, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, cordesejada, "USE: /corveh [color id 1] [color id 2]");
new color1 = strval(tmp);
if(color1 < 0 || color1 > 300) return SendClientMessage(playerid, cordesejada, "Use de 0/300.");
CarColor[playerid][0] = color1;
new color2;
tmp = strtok(params, idx);
if(!strlen(tmp)) color2 = color1;
else color2 = strval(tmp);
if(color2 < 0 || color2 > 300) return SendClientMessage(playerid, cordesejada, "Use de 0/300.");
CarColor[playerid][1] = color2;
ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
return 1;
}