Need Small help Rep + - 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: Need Small help Rep + (
/showthread.php?tid=558953)
Need Small help Rep + -
MBilal - 20.01.2015
Код:
if(newstate == PLAYER_STATE_DRIVER) return GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
for(new passengerid = 0; passengerid < MAX_PLAYERS; passengerid++)
{
if(IsPlayerConnected(passengerid) && GetPlayerVehicleID(passengerid) == GetPlayerVehicleID(playerid))
{
RemovePlayerFromVehicle(passengerid);
SendClientMessage(passengerid, 0xFF0000FF, "The driver is leaving the vehicle!");
}
}
return 1;
}
Hello I've problem with this code ,I'm using Anti G abuse script the script work fine when driver not in vehicle but it not work fine when driver leave vehicle ..How i can Fix it ?
Re: Need Small help Rep + -
ChandraLouis - 20.01.2015
So what's the problem ? We can't help you unless you gave us the problem.
Re: Need Small help Rep + -
Ryz - 20.01.2015
youre using outdated g-abuse system
you must use OnPlayerWeaponShot.
Re: Need Small help Rep + -
MBilal - 20.01.2015
I'm using Anti G abuse script the script work fine when driver not in vehicle but it not work fine when driver leave vehicle ..How i can Fix it ?
Dude Ryz Can you show me Example?
Re: Need Small help Rep + -
xVIP3Rx - 20.01.2015
try it.
pawn Код:
new pVehicle[MAX_PLAYERS];
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
pVehicle[playerid] = GetPlayerVehicleID(playerid);
}
if(oldstate == PLAYER_STATE_DRIVER)
{
for(new id; id < MAX_PLAYERS; id++)
{
if(IsPlayerConnected(id) && GetPlayerVehicleID(id) == pVehicle[playerid])
{
RemovePlayerFromVehicle(id);
SendClientMessage(id, 0xFF0000FF, "The driver is leaving the vehicle!");
}
}
pVehicle[playerid] = INVALID_VEHICLE_ID;
}
return 1;
}
Re: Need Small help Rep + -
MBilal - 20.01.2015
xVIP3Rx Rep ++ Pro