03.09.2011, 20:28
This comand doesnt seem to be working.
Just respawns the car with some wierd letter as a plate if i type in numbers. But if i type in letters it just respawns the vehicle and leaves the default plate.
My command:
Just respawns the car with some wierd letter as a plate if i type in numbers. But if i type in letters it just respawns the vehicle and leaves the default plate.
My command:
Код:
dcmd_plate(playerid,params[]) { new Vehicle, plate[MAX_PLAYERS]; new tmp[256], Index; new Float:X,Float:Y,Float:Z; Vehicle = GetPlayerVehicleID(playerid); tmp = strtok(params,Index),plate[playerid] = strval(tmp); if(GetPlayerScore(playerid) < 5) return SendClientMessage(playerid, GREY, "ERROR: Љo kommandu var izmantot no 5. līmeņa."); if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,GREY,"ERROR: Tev jāatrodas maљīnā lai izmantotu љo komandu."); if(IsDriver[playerid] == 0) return SendClientMessage(playerid,GREY,"ERROR: Tev jāatrodas pie stūres lai izmantotu љo komandu."); if(!strlen(params)) return SendClientMessage(playerid,GREY,"ERROR: /plate [Teksts]"); SetVehicleNumberPlate(Vehicle,plate[playerid]); GetVehiclePos(Vehicle,Float:X,Float:Y,Float:Z); SetVehicleToRespawn(Vehicle); SetVehiclePos(Vehicle,Float:X,Float:Y,Float:Z); PutPlayerInVehicle(playerid,Vehicle,0); return 1; }