28.12.2010, 09:53
if(strcmp(cmd, "/plate", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new ID = GetPlayerVehicleID(playerid);
new cmodel = GetVehicleModel(ID);
cmodel -= 400;
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GRAD2, "* ERROR");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /plate [number/name]");
return 1;
}
else
{
SetVehicleNumberPlate(ID, tmp);
SetVehicleToRespawn(ID);
format(string,sizeof(string),"* carname: %d number/name: %s",PlayerVehicle[cmodel],tmp);
SendClientMessage(playerid, 0x00FFFFFF, string);
}
}
}
return 1;
}
Help please...
{
if(IsPlayerConnected(playerid))
{
new ID = GetPlayerVehicleID(playerid);
new cmodel = GetVehicleModel(ID);
cmodel -= 400;
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GRAD2, "* ERROR");
return 1;
}
if(PlayerInfo[playerid][pAdmin] >= 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /plate [number/name]");
return 1;
}
else
{
SetVehicleNumberPlate(ID, tmp);
SetVehicleToRespawn(ID);
format(string,sizeof(string),"* carname: %d number/name: %s",PlayerVehicle[cmodel],tmp);
SendClientMessage(playerid, 0x00FFFFFF, string);
}
}
}
return 1;
}
Help please...