SA-MP Forums Archive
RemovePlayerFromVehicle not work - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: RemovePlayerFromVehicle not work (/showthread.php?tid=396123)



RemovePlayerFromVehicle not work - Louris - 29.11.2012

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
PutPlayerInVehicle(playerid, vehicleid, 0);
if(DM[playerid]) return SendClientMessage(playerid, 0xDEEE20FF, "Vaћinėti su maљina DM zonoje draudћiama!");
if(DM[playerid]) return RemovePlayerFromVehicle(playerid);
   	return 1;
}
This line:

Код:
if(DM[playerid]) return SendClientMessage(playerid, 0xDEEE20FF, "Vaћinėti su maљina DM zonoje draudћiama!");
works good, but this line:

Код:
if(DM[playerid]) return RemovePlayerFromVehicle(playerid);
Doesn't work, nothing happens.


Re: RemovePlayerFromVehicle not work - jueix - 29.11.2012

Quote:
Originally Posted by Louris
Посмотреть сообщение
Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
PutPlayerInVehicle(playerid, vehicleid, 0);
if(DM[playerid]) return SendClientMessage(playerid, 0xDEEE20FF, "Vaћinėti su maљina DM zonoje draudћiama!");
if(DM[playerid]) return RemovePlayerFromVehicle(playerid);
   	return 1;
}
This line:

Код:
if(DM[playerid]) return SendClientMessage(playerid, 0xDEEE20FF, "Vaћinėti su maљina DM zonoje draudћiama!");
works good, but this line:

Код:
if(DM[playerid]) return RemovePlayerFromVehicle(playerid);
Doesn't work, nothing happens.
try this
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
PutPlayerInVehicle(playerid, vehicleid, 0);
if(DM[playerid])
    {
    SendClientMessage(playerid, 0xDEEE20FF, "Vaћinėti su maљina DM zonoje draudћiama!");
    RemovePlayerFromVehicle(playerid);
    return 1;
    }
}



Re: RemovePlayerFromVehicle not work - Louris - 29.11.2012

Works, thanks!