Command to spawn cars
#9

pawn Код:
if (!strcmp (cmdtext,"/infernus", true))
    {
        if(IsPlayerAdmin(playerid)) //Is the player rcon admin?
        {
            if(!IsPlayerInAnyVehicle(playerid) //the "!" means that if "IsPlayerInVehicle" returns false, the code will execute, if not, the return code will.
            {
                GetPlayerPos(playerid, Float:X, Float:Y, Float:Z);
                GetPlayerFacingAngle(playerid, Float:Angle);
                CreateVehicle(411, X, Y, Z + 2.0, Angle + 90.0, -1, -1, 5000);
            }
            return SendClientMessage(playerid,0xFF0000FF,"You are already in a vehicle!"); //If the player already is in a vehicle, this will happen
        }
        return SendClientMessage(playerid,0xFF0000FF,"Access denied!"); //If the player wasn't logged in to rcon, this happens.
    }
That Should Work But Im Not Going To Test It.
Reply


Messages In This Thread
Command to spawn cars - by KennethHoegh - 15.04.2009, 18:55
Re: Command to spawn cars - by HB - 15.04.2009, 19:01
Re: Command to spawn cars - by KennethHoegh - 15.04.2009, 19:06
Re: Command to spawn cars - by Pyrokid - 15.04.2009, 21:33
Re: Command to spawn cars - by Weirdosport - 16.04.2009, 00:23
Re: Command to spawn cars - by KennethHoegh - 16.04.2009, 06:59
Re: Command to spawn cars - by hanzen - 16.04.2009, 09:37
Re: Command to spawn cars - by Coolman12 - 16.04.2009, 10:10
Re: Command to spawn cars - by Metorea - 16.04.2009, 10:24

Forum Jump:


Users browsing this thread: 1 Guest(s)