SA-MP Forums Archive
Help? - 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: Help? (/showthread.php?tid=470628)



Help? - eblood1 - 19.10.2013

How i can do when a player touch a signal like a checkpoint, when player touch it the /vehicles menu show up?


Re: Help? - TehMiles - 19.10.2013

You'll need to essentially used the code that is specified in your "/vehicles" menu, and place it under what is called when the player touches the checkpoint.

Код:
public OnPlayerEnterCheckpoint(playerid)
{
   // Put the code in here, be sure to specify which checkpoint they are entering, if you have more than one. Either way, it is good practice, as you never know who might add another one in the future, and then be confused.
    return 1;
}



Re: Help? - eblood1 - 19.10.2013

idk how :/ lol


Re: Help? - qazwsx - 19.10.2013

I'd rather using Streamer checkpoint in this problem

Make sure you have this include:
pawn Код:
#include <streamer>
then create this:
pawn Код:
new CP;//making variable
then, use function callback onplayerenterdynamiccp:
pawn Код:
public OnPlayerEnterDynamicCP(playerid,checkpointid)
{
if(checkpointid == CP)
{
ShowPlayerDialog(..........)//Your code here!
}
return 1;
}
Wish this helped


Re: Help? - TehMiles - 19.10.2013

Actually, since only one checkpoint can be shown at a time using what I posted, I suggest if you want more, going with what qazwsx said, or just disregarding what I said about identifying which checkpoint the player is entering.

Post your "/vehicles" command code here, and I will do it for you, for sure, man.


Re: Help? - eblood1 - 19.10.2013

dcmd_vehicle(playerid,params[])
? that


Re: Help? - TehMiles - 19.10.2013

The stuff / lines under that, please.

Also please use the [*CODE] CODE HERE [*/CODE] tags on the forums, but remove the stars, of course, and paste the coding in the middle of them, the two.

Thank you, man!


Re: Help? - DanishHaq - 19.10.2013

[ pawn ] [ / pawn ] tags, not code.