SA-MP Forums Archive
/findjob command 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: /findjob command help (/showthread.php?tid=640982)



/findjob command help - iTooTech - 09.09.2017

Could anyone help me with a /findjob command? i want to make it where it will make an icon on the map to go to the location. I'm fairly new, so if anyone could show me, or point me in the right direction, that would be greatly appreciated. Thanks!


Re: /findjob command help - AmarPlayer - 09.09.2017

First go into your game, go to the place you want to set the "icon" to appear on, then type /save Job location.
After that close the game, go to your Documents, GTA San Andreas User Files, SAMP, savedpositions and it should look like this:
AddPlayerClass(46, -2092.3467, 285.9698, 35.3322, 249.5110 ,0, 0, 0, 0, 0, 0); // Job location
Then copy the second, third, and fourth parameter and then do this:


Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/findjob", cmdtext, true, 10) == 0)
	{
		SetPlayerCheckpoint(playerid, -2092.3467, 285.9698, 35.3322, 5);
		return 1;
	}
	return 0;
}

public OnPlayerEnterCheckpoint(playerid)
{
	DisablePlayerCheckpoint(playerid);
	return 1;
}
And that should be it.