/getveh
#1

Using GF, if possible could someone make a /getveh [vehid] cmd, which sets an existing vehicle position and angle to the current position and angle of the player that has entered the command, if possible for admin level 3 and higher. and if the vehicle id does not exist send a message saying "Not an existing vehicle id"

Cheers, will rep.
Reply
#2

Replace IsPlayerAdmin to use your admin variable/system.

pawn Код:
CMD:getcar(playerid, params[])
{
     if(IsPlayerAdmin(playerid))
     {
          if(sscanf(params, "d", vehicleid)) return SendClientMessage(playerid, -1, "USAGE: /getcar [car]");
          if(IsValidVehicle(vehicleid))
          {
                 new Float: pos[3];
                 GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
                 SetVehiclePos(playerid, pos[0], pos[1], pos[2]);
                 SetPlayerPos(playerid, pos[0], pos[1]+3.0, pos[2]);
                 return 1;
           }
          else return SendClientMessage(playerid, -1, "That vehicle isn't valid.");
     }
    else return SendClientMessage(playerid, -1, "Your not an admin!");
}
Or of-course you could've simply searched. Anyway, basically you need to get the player's pos, and then set the vehicle's coordinates accordingly.
Reply
#3

Cheers Abagail, will try it out later today.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)