07.07.2010, 12:35
pawn Код:
if(strcmp("/carcolor", cmdtext, true, 10)== 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
new idx;
new tmp[256];
tmp = strtok(cmdtext, idx);
new tmp2[256]; tmp2 = strtok(cmdtext, idx);
new color1 = strval(tmp);
new color2 = strval(tmp2);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /carcolor [color1] [color2]");
if(!strlen(tmp2)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /carcolor [color1] [color2]");
ChangeVehicleColor(GetPlayerVehicleID(playerid), color1, color2);
} else {
SendClientMessage(playerid, COLOR_BRIGHTRED, "You must be in a vehicle to use this command !");
}
return 1;
}
return 0;