NRG/INF command
#5

i use this

PHP код:
forward CarSpawner(playerid,model);
CMD:inf(playerid,params[])
{
        if (!
IsPlayerInAnyVehicle(playerid))
        {
            
CarSpawner(playerid,411);
            return 
SendClientMessage(playerid,0x1400FFFF,"Car Successfully Created!");
        }
        else return 
SendClientMessage(playerid,COLOR_RED,"Error: You already have a vehicle");
    }
CMD:nrg(playerid,params[])
{
        if (!
IsPlayerInAnyVehicle(playerid))
        {
            
CarSpawner(playerid,522);
            return 
SendClientMessage(playerid,0x1400FFFF,"Car Successfully Created!");
        }
        else return 
SendClientMessage(playerid,COLOR_RED,"Error: You already have a vehicle");
    }
public 
CarSpawner(playerid,model)
{
    if(
IsPlayerInAnyVehicle(playerid))
    
SendClientMessage(playeridCOLOR_RED"ERROR: You already have a car!");
    else
    {
        new 
Float:xFloat:yFloat:zFloat:angle;
        
GetPlayerPos(playeridxyz);
         
GetPlayerFacingAngle(playeridangle);

        new 
vehicleid=CreateVehicle(modelxyzangle, -1, -1, -1);
        
PutPlayerInVehicle(playeridvehicleid0);
        
SetVehicleVirtualWorld(vehicleidGetPlayerVirtualWorld(playerid));
        
LinkVehicleToInterior(vehicleidGetPlayerInterior(playerid));
        
ChangeVehicleColor(vehicleid,0,3);
    }
    return 
1;

If That helped you +rep
Reply


Messages In This Thread
NRG/INF command - by MonSterLikeHD - 02.04.2016, 11:04
Re: NRG/INF command - by SamJust - 02.04.2016, 11:11
Re: NRG/INF command - by SyS - 02.04.2016, 11:19
Re: NRG/INF command - by Vince - 02.04.2016, 11:31
Re: NRG/INF command - by Loinal - 02.04.2016, 11:42

Forum Jump:


Users browsing this thread: 1 Guest(s)