SA-MP Forums Archive
Help please -Solved By Don Correlli- - 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: Help please -Solved By Don Correlli- (/showthread.php?tid=135555)



Help please -Solved By Don Correlli- - bartje01 - 21.03.2010

The message : je stinkt should only shows when you aren;t in a NRG-500
But it just aaaalways show.

My code:
Код:
case DRIVELIC_CHECKPOINT1:
	    {
        if(GetVehicleModel(playerid) == 522)
				{
	      SendClientMessage(playerid,orange,"Nice driving");
	      SetPlayerRaceCheckpoint(playerid, 0, 1669.2777,-1734.5085,12.9315, -2007.3123, -73.4380, 34.8973, 4.0);
	      gPlayerDrivingCheckpoints[playerid] = DRIVELIC_CHECKPOINT2;
			}else{SendClientMessage(playerid,red,"je stinkt");
			}
			}
PLease please help


Re: Help please - Correlli - 21.03.2010

GetVehicleModel function requires a vehicleid parameter, not playerid.


Re: Help please - bartje01 - 21.03.2010

Код:
case DRIVELIC_CHECKPOINT1:
	    {
        if(GetVehicleModel(vehicleid) == 522)
				{
	      SendClientMessage(playerid,orange,"Nice driving");
	      SetPlayerRaceCheckpoint(playerid, 0, 1669.2777,-1734.5085,12.9315, -2007.3123, -73.4380, 34.8973, 4.0);
	      gPlayerDrivingCheckpoints[playerid] = DRIVELIC_CHECKPOINT2;
			}else{SendClientMessage(playerid,red,"je stinkt");
			}
			}
That gives an error with : Undefined symbol vehicleid? Please fix


Re: Help please - Correlli - 21.03.2010

pawn Код:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 522)
{
  // your code.
}



Re: Help please - bartje01 - 21.03.2010

Thanks man. It works. I won't forget how to do this :P
Your credits in topic name


Re: Help please - Correlli - 21.03.2010

You're welcome.