#3

Sure. Even though some of them show like Zcmd format I only changed the top so they are the same.
PHP код:
//=================[Commands]===============================================
    
CMD:boost(playeridparams[])
    {
        if(
GetPlayerMoney(playerid) <10000)
         {
            
SendClientMessage(playerid,0xAA3333AA"You are a little low on the dough.");
          }
        else
        {
        
GivePlayerMoney(playerid,-10000);
        
AddVehicleComponent(GetPlayerVehicleID(playerid),1010);
        }
        return 
1;
         }
        
CMD:handsup(playerid,params[])
        {
         
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
         return 
1;
         }
         
CMD:start(playerid,params[])
         {
        
SetPlayerPos(playerid,2313.4158,-1987.8317,13.5590);
        return 
1;
        }
        
CMD:minigun(playerid,params[])
        {
          if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid0xFF0000AA"This command can only be used by an admin!!");
        
GivePlayerWeapon(playerid38500); //Give playerid minigun with 500 ammo
        
return 1;
        }
        
CMD:heal(playerid,params[])
        if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playerid0xFF0000AA"This command can only be used by an admin!!");
        
SetPlayerHealth(playerid100);
        return 
1;
         }
         
CMD:engine(playerid,params[])
         {
        new 
vehicleid GetPlayerVehicleID(playerid);//defining vehicleid is = to GetPlayerVehicleID.
        
new enginelightsalarmdoorsbonnetbootobjective;//these are the defines of the thing used in the command.
        
if(IsPlayerInAnyVehicle(playerid))//This will check that if a player is in the vehicle or not.
            
{
                if(
GetPlayerVehicleSeat(playerid) == 0//Now this will check that if a player is on the driving seat or not.
                
{
                    
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//will check that what is the state of the engine.
                    
if(engine == 1)//will check that if the engine in on or not.
                    
{
                        
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//this will check that what is the state of engine.That is is on or off.We can use it for multiple things like doors,alarms etc.But In this case I am using this for the engine only.
                        
SetVehicleParamsEx(vehicleid,false,lights,alarm,doors,bonnet,boot,objective);//when we change the engine and replace it with false,this will turn the vehicle engine off.Same if we make if true,this will make the engine on.
                        
GameTextForPlayer(playerid,"Vehicle Engine Stopped!",2000,6);//for a text to appar on the screen for only 2 seconds.
                        
return 1;
                    }
                    else
                    
SetVehicleParamsEx(vehicleid,true,lights,alarm,doors,bonnet,boot,objective);//if vehicle engine is false it will change it to true.
                    
GameTextForPlayer(playerid,"Vehicle Engine Started!",2000,6);//for a text to appar on the screen for only 2 seconds.
                
}
                else 
SendClientMessage(playerid,-1,"Error: You are not at the driving seat!");//this is an error message,that if a player is not on the driving seat,this error message would appear.
                
return 1;
            }
            else
            
SendClientMessage(playerid,-1,"Error: You are not in a vehicle!");//this is the error message,that if a player is not in the car,the error message would apper.
            
}
        
CMD:camera(playerid,params[])
          new 
Float:xFloat:yFloat:z;
        
GetPlayerCameraPos(playeridxyz);
        
printf("You are looking at at %f,%f,%f."xyz);
        }
public 
OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext"/enter"true))
    {
    if(
IsPlayerInRangeOfPoint(playerid3.01929.3467,-1776.0195,13.5469))
        {
    
SetPlayerPos(playerid,-30.946699,-89.609596,1003.549988);//Idlegas entrance
    
SetPlayerInterior(playerid18);
        }
    }
    if(!
strcmp(cmdtext"/exit"true))
    {
    if(
IsPlayerInRangeOfPoint(playerid3.0, -30.9595,-91.7379,1003.5469))
        {
    
SetPlayerPos(playerid,1929.3467,-1776.0195,13.5469);//Idlegas Exit
}
    }
     if(
strcmp(cmdtext"/music"true) == 0)
    {
    if(!
IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid0xFF0000AA"You are not in a vehicle!!");
    
ShowPlayerDialog(playerid4576DIALOG_STYLE_LIST"Music","Pulse FM Pure Dance\n Hip Hop""Select""Cancel");
    }
      if (
strcmp("/v lights"cmdtexttrue10) == 0)//Head light.
    
{
        new 
vehicleid GetPlayerVehicleID(playerid);//Gets the vehicle Id of the player
        
new enginelightsalarmdoorsbonnetbootobjective;//these are the defines of the thing used in the command.
        
if(IsPlayerInAnyVehicle(playerid))//This will check that if a player is in the vehicle or not.
            
{
                if(
GetPlayerVehicleSeat(playerid) == 0//Now this will check that if a player is on the driving seat or not.
                
{
                    
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//will check that what is the state of the lights.
                    
if(lights == 1)//will check that if the lights are on or not.
                    
{
                        
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);//this will check that what is the state of the lights.That is is on or off.We can use it for multiple things like doors,alarms etc.But In this case I am using this for the lights only.
                        
SetVehicleParamsEx(vehicleid,engine,false,alarm,doors,bonnet,boot,objective);//when we change the engine and replace it with false,this will turn the vehicle engine off.Same if we make if true,this will make the engine on.
                        
GameTextForPlayer(playerid,"The vehicle lights have been turned off.",2000,6);//for a text to appar on the screen for only 2 seconds.
                        
return 1;
                    }
                    else
                    
SetVehicleParamsEx(vehicleid,engine,true,alarm,doors,bonnet,boot,objective);//if vehicle engine is false it will change it to true.
                    
GameTextForPlayer(playerid,"The vehicle lights have turned on!",2000,6);//for a text to appar on the screen for only 2 seconds.
                
}
                else 
SendClientMessage(playerid,-1,"Error: You are not at the driving seat!");//this is an error message,that if a player is not on the driving seat,this error message would appear.
                
return 1;
                }
                else 
SendClientMessage(playerid,-1,"Error: You are not in a vehicle!");//this is the error message,that if a player is not in the car,the error message would apper.
     
}
     if (
strcmp("/frontfall"cmdtexttrue10) == 0)
    {
     
ApplyAnimation(playerid"PED""KO_shot_front",4.1,0,1,1,1,1);
     return 
1;
     }
     if (
strcmp("/stopanim"cmdtexttrue10) == 0)
    {
     
ClearAnimations(playerid);
     return 
1;
     }
    return 
0;
 } 
Reply


Messages In This Thread
Zcmd - by lramos15 - 22.02.2013, 17:44
Re: Zcmd - by Goldino - 22.02.2013, 17:46
Re: Zcmd - by lramos15 - 22.02.2013, 19:53
Re: Zcmd - by Mystique - 22.02.2013, 20:40
Re: Zcmd - by lramos15 - 22.02.2013, 21:24
Re: Zcmd - by Scenario - 22.02.2013, 21:29
Re: Zcmd - by lramos15 - 22.02.2013, 21:54
Re: Zcmd - by Scenario - 22.02.2013, 21:58
Re: Zcmd - by lramos15 - 22.02.2013, 22:03

Forum Jump:


Users browsing this thread: 1 Guest(s)