hay guys please make me a /callcar cmds
#4

Should work:
PHP код:
#define FILTERSCRIPT
#include <a_samp>

#define COLOR_RED 0xAA3333AA

new Summair1;
new 
Summair2;
new 
pName[MAX_PLAYER_NAME];
new 
pName1[MAX_PLAYER_NAME];
new 
Float:xFloat:yFloat:z;

public 
OnFilterScriptInit()
{
    
Summair1 AddStaticVehicle(562,-1959.1219,288.1400,35.1337,89.6646,145,145);
    
Summair2 AddStaticVehicle(411,-1986.5643248.886334.9182000);
    
AddVehicleComponent(Summair11036);
    
AddVehicleComponent(Summair11040);
    
AddVehicleComponent(Summair11034);
    
AddVehicleComponent(Summair11172);
    
AddVehicleComponent(Summair11149);
    
AddVehicleComponent(Summair11035);
    
AddVehicleComponent(Summair11002);
    
AddVehicleComponent(Summair11079);
    return 
1;
}


public 
OnPlayerCommandText(playeridcmdtext[])
{
    
GetPlayerName(playerid,pName,sizeof(pName));
    if (
strcmp("/callpriveh"cmdtexttrue10) == 0)
    {
        if(
strcmp("Summair",pName,true) == 0)
        {
            if(!
IsPlayerInAnyVehicle(playerid))
            {
                
GetPlayerPos(playerid,x,y,z);
                
SetVehiclePos(Summair1,x,y,z);
                
PutPlayerInVehicle(playerid,Summair1,0);
                return 
0;
            }
            return 
1;
        }
        return 
1;
    }
    if(
strcmp("/callsecveh",cmdtext,true,10) == 0)
    {
        if(
strcmp(pName,"Summair",true) == 0)
        {
            if(!
IsPlayerInAnyVehicle(playerid))
            {
                
GetPlayerPos(playerid,x,y,z);
                
SetVehiclePos(Summair2,x,y,z);
                
PutPlayerInVehicle(playerid,Summair2,0);
                return 
0;
            }
            else 
SendClientMessage(playerid,COLOR_RED,"ERROR: You must exit the vehicle before using this command!");
            return 
1;
        }
        return 
1;
    }
    return 
0;
}

public 
OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
    
GetPlayerName(playerid,pName1,sizeof(pName1));
    new 
vehid GetVehicleModel(vehicleid);
    if(
vehid == Summair1)
    {
        if(
strcmp("Summair",pName1,true) == 1)
        {
            
SetVehicleParamsForPlayer(vehicleid,playerid,0,1);
            
SendClientMessage(playerid,COLOR_RED,"ERROR: This vehicle belongs to Summair!");
            return 
1;
        }
    }
    if(
vehid == Summair2)
    {
        if(
strcmp("Summair",pName1,true) == 1)
        {
            
SetVehicleParamsForPlayer(vehicleid,playerid,0,1);
            
SendClientMessage(playerid,COLOR_RED,"ERROR: This vehicle belongs to Summair!");
            return 
1;
        }
    }
    return 
1;

Reply


Messages In This Thread
hay guys please make me a /callcar cmds - by shaikh007 - 12.07.2011, 04:26
Re: hay guys please make me a /callcar cmds - by [MG]Dimi - 12.07.2011, 06:21
Re: hay guys please make me a /callcar cmds - by shaikh007 - 12.07.2011, 08:19
Re: hay guys please make me a /callcar cmds - by [MG]Dimi - 12.07.2011, 08:50
Re: hay guys please make me a /callcar cmds - by shaikh007 - 12.07.2011, 09:12
Re: hay guys please make me a /callcar cmds - by [MG]Dimi - 12.07.2011, 09:17
Re: hay guys please make me a /callcar cmds - by shaikh007 - 12.07.2011, 09:31
Re: hay guys please make me a /callcar cmds - by shaikh007 - 12.07.2011, 13:26
Re: hay guys please make me a /callcar cmds - by [MG]Dimi - 12.07.2011, 13:27
Re: hay guys please make me a /callcar cmds - by shaikh007 - 12.07.2011, 13:34

Forum Jump:


Users browsing this thread: 1 Guest(s)