Transport wood
#2

Quote:
Originally Posted by Sn4ke2
Посмотреть сообщение
Hy all !
I have a problem.
I make a dialog to transport wood, look:
PHP код:
if(dialogid == DIALOG_TRANSPORTWOOD)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                new 
CarWood CreateVehicle(411,-431.8788,-1410.3784,22.0100,0,0,0,0);
                
PutPlayerInVehicle(playerid,CarWood,0);
            
            
                
DisablePlayerCheckpoint(playerid);
            
            
            }
        }
        return 
1;
    } 
And when player exit the vehicle to destroy vehicle i make this:

PHP код:
public OnPlayerExitVehicle(playeridvehicleid
And i add this
PHP код:
 DestroyVehicle(CarWood); 
BUT NOT WORK ! Why ? Can help me ?
not working why CarWood is not global vairable.

try this:

Код:
new pCar[MAX_PLAYERS];


if(dialogid == DIALOG_TRANSPORTWOOD)
	{
		if(response)
		{
			if(listitem == 0)
			{
				new CarWood = CreateVehicle(411,-431.8788,-1410.3784,22.0100,0,0,0,0);
				PutPlayerInVehicle(playerid,CarWood,0);
				pCar[playerid] = GetPlayerVehicleID(playerid);
				DisablePlayerCheckpoint(playerid);


			}
		}
		return 1;
	}

public OnPlayerExitVehicle(playerid, vehicleid){
	DestroyVehicle(pCar[playerid]);
 	return 1;
}


public OnPlayerConnect(playerid){
	pCar[playerid] = -1;
	return 1;
}

public OnPlayerDisconnect(playerid,reason){
	DestroyVehicle(pCar[playerid]);
	return 1;
}
Reply


Messages In This Thread
Transport wood - by Sn4ke2 - 07.06.2015, 05:39
Re: Transport wood - by FplayerGR - 07.06.2015, 05:46
Re: Transport wood - by Sn4ke2 - 07.06.2015, 06:26

Forum Jump:


Users browsing this thread: 1 Guest(s)