11.04.2012, 18:26
Nvm I FIxed The Error But Now When i put /setplate Elias
i get spawned another place plz tell me how to fix it
now the code is :
i get spawned another place plz tell me how to fix it
now the code is :
pawn Код:
if(strcmp(cmd, "/setplate", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return
SendClientMessage(playerid, red,"Usage : /setplate [Plate Name]");
if(strlen(tmp))
{
new Float:x, Float:y, Float:z, Float:angle;
new vehicle = GetPlayerVehicleID(playerid);
new model = GetVehicleModel(vehicle);
DestroyVehicle(vehicle);
SetVehicleNumberPlate(vehicle = CreateVehicle(model, x, y, z, angle, 0, 0, 0), tmp);
PutPlayerInVehicle(playerid, vehicle, 0);
format(string, sizeof string,"You successfully set your plate number to %s",tmp);
SendClientMessage(playerid, red, string);
}
return 1;
}