08.05.2012, 13:47
(Hvorfor ikke bare spшrre meg jeg svarer jo uansett?)
this should help
And also add a DestroyVehicle on the command but i recommand making a command to quit the derby.
And do the code like this. This creates the vehicle when the player type the command(the one you have does to but easyer) this also use less space.
this should help

pawn Код:
public OnPlayerDisconnect(playerid)
{//add a "if" if you want it to just be destroyed when it is the derby car.
DestroyVehicle((GetPlayerVehicleID(playerid)));
return 1;
}
And do the code like this. This creates the vehicle when the player type the command(the one you have does to but easyer) this also use less space.
pawn Код:
dcmd_mderby(playerid,cmdtext[])
{
if(AccInfo[playerid][GodCar] == 1)
{
AccInfo[playerid][GodCar] = 0;
PutPlayerInVehicle(playerid, (CreateVehicle(444,1531.1086, 3700.6135, 8.6852,0.0000,-1,-1,-1)), 0);
SendClientMessage(playerid,green,"Welcome to Monster Derby!");
return
SendClientMessage(playerid,green,"/cargod is NOW auto-turned off.");
}
else if (AccInfo[playerid][GodCar] == 0)
{
PutPlayerInVehicle(playerid, (CreateVehicle(444,1531.1086, 3700.6135, 8.6852,0.0000,-1,-1,-1)), 0);
//LinkVehicleToInterior(VehicleID, NUMBER); // if interior > 0
//SetPlayerInterior(VehicleID, NUMBER); // if interior > 0
SendClientMessage(playerid,green,"Welcome to Monster Derby!");
}
return 1;
}