SA-MP Forums Archive
Wtf??? Help please - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Wtf??? Help please (/showthread.php?tid=173134)



Wtf??? Help please - bartje01 - 01.09.2010

Hey guys. I want that when you enter the bus1 or bus2 you'll get a message.

But you get a message even when you enter another car.

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if (newstate == PLAYER_STATE_DRIVER)
    {
    if(GetPlayerVehicleID(playerid) == bus1 || bus2)
{

    SendClientMessage(playerid,COLOR_YELLOW,"Works");

}
}

    return 1;
}
please help


Re: Wtf??? Help please - Cank - 01.09.2010

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if (newstate == PLAYER_STATE_DRIVER)
{
new pVehID=GetPlayerVehicleID(playerid);
if((pVehID == bus1) || (pVehID==bus2))
{

SendClientMessage(playerid,COLOR_YELLOW,"Works");

}
}

return 1;
}


Re: Wtf??? Help please - bartje01 - 01.09.2010

Ye lol. I already noticed it. Dumb mistake from me xD Thanks