12.03.2011, 07:14
Alright another problem.. I have a getcarid command, but whenever I type it the last parts will be erased.
For example if I type /getcarid 5 it will remove the . from, ("You have teleported vehicle ID 5 to you.") if you do /getcarid 55 it will remove the u and the . from that message, so for every digit in the vehicle ID it removed that from the end of the text.
One more problem in it is that you can teleport a car to you that doesnt exit.. For example /getcarid 1337 when vehicle id 1337 doesn't exist (It still says you teleported it to you instead of saying nothing, or something like "Vehicle 1337 does not exist")
Here is my command
For example if I type /getcarid 5 it will remove the . from, ("You have teleported vehicle ID 5 to you.") if you do /getcarid 55 it will remove the u and the . from that message, so for every digit in the vehicle ID it removed that from the end of the text.
One more problem in it is that you can teleport a car to you that doesnt exit.. For example /getcarid 1337 when vehicle id 1337 doesn't exist (It still says you teleported it to you instead of saying nothing, or something like "Vehicle 1337 does not exist")
Here is my command
Код:
command(getcarid, playerid, params[]) { new id, string[40]; if(sscanf(params, "d", id)) { if(Player[playerid][AdminLevel] >= 4) { SendClientMessage(playerid, WHITE, "SYNTAX: /getcarid [carid]"); } } else { if(Player[playerid][AdminLevel] >= 4) { new Float: PosX, Float: PosY, Float: PosZ; GetPlayerPos(playerid, PosX, PosY, PosZ); SetVehiclePos(id, PosX, PosY, PosZ); format(string, sizeof(string), "You have teleported vehicle ID %d to you.", id); SendClientMessage(playerid, WHITE, string); } } return 1; }