28.02.2014, 16:07
Hi,
Thanks for taking your time reading this topic. I'm currently attempting to start up my own server, but have bumped into quite a weird problem. I created a vehicle spawning command for admins, although the vehicle seems to return to it's original spawning point as the vehicle is driven and then exited. I will post the command below, but I doubt there's anything weird in there as I've gone through it a couple of items.
Cheers!
Thanks for taking your time reading this topic. I'm currently attempting to start up my own server, but have bumped into quite a weird problem. I created a vehicle spawning command for admins, although the vehicle seems to return to it's original spawning point as the vehicle is driven and then exited. I will post the command below, but I doubt there's anything weird in there as I've gone through it a couple of items.
Код:
CMD:aveh(playerid,params[]) { new car; new string[128]; new Float:X, Float:Y, Float:Z; GetPlayerPos(playerid, Float:X, Float:Y, Float:Z); if(PlayerInfo[playerid][Level] < 2) return SendClientMessage(playerid,0xF69521AA, "You cannot use this command!");//Checking if the player has admin level 2, if not it sends him a message. if(sscanf(params,"i", car)) return SendClientMessage(playerid,0xF69521AA,"USAGE: /aveh <vehicle id (400-611)>"); if (!(400 <= car <= 611)) return SendClientMessage(playerid,0xF69521AA,"Please specify a vehicle ID between 400 and 611"); { Vehicle[playerid] = CreateVehicle(car, X, Y, Z + 2.0, 0, -1, -1, 1); format(string, sizeof(string), "You have successfully spawned vehicle id %i!",car); SendClientMessage(playerid, 0xF69521AA, string); } return 1; }