22.04.2009, 14:31
Try using it with strtok
pawn Код:
if(!strcmp(cmd,"/changeplate",true))
{
new idx;
new plate[8];
plate = strtok(cmdtext,idx);
if(!IsPlayerAdmin(playerid))
return SendClientMessage(playerid,0xFFFFFFAA,"You are not authorized to use this command.");
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid,0xFFFFFFAA,"You have to be inside a vehicle.");
if(!strlen(plate))
return SendClientMessage(playerid,0xFFFFFFAA,"USAGE: /changeplate [newplate]");
return SetVehicleNumberPlate(GetPlayerVehicleID(playerid),plate);
}