/getveh
#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


Messages In This Thread
/getveh - by JaydenJason - 04.11.2014, 22:30
Re: /getveh - by Abagail - 04.11.2014, 22:37
Re: /getveh - by JaydenJason - 05.11.2014, 05:46

Forum Jump:


Users browsing this thread: 2 Guest(s)