SA-MP Forums Archive
NEED HELP! GameText Tutorial In-Game 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: NEED HELP! GameText Tutorial In-Game Help (/showthread.php?tid=70542)



NEED HELP! GameText Tutorial In-Game Help - Dol - 25.03.2009

You probably know Redgie's RP's short tutorial ingame with GameText. The player gets to see a spot and you will get a small tutorial in GameText-style.

I want to do a bit similar stuff, I want to freeze the player for 15 seconds and then put a GameText on their screen like this:

~r~Do not deathmatch, revenge kill, bug abuse or hack.~n~
~r~You are also not allowed to metagame or powergame.~n~
~r~Have fun!

This is the player spawn part:

Код:
public OnPlayerSpawn(playerid)
{
	if(gPlayerLogged[playerid])
	{
		SetPlayerSpawn(playerid);
	}
	return 1;
}
Help me!


Re: NEED HELP! GameText Tutorial In-Game Help - LarzI - 25.03.2009

use TogglePlayerControllable, GameTextForPlayer, SetTimer and again TogglePlayerControllable.


Re: NEED HELP! GameText Tutorial In-Game Help - Dol - 25.03.2009

I'm sorry but I'm a big n00b. Could you please explain?


Re: NEED HELP! GameText Tutorial In-Game Help - Rks25 - 25.03.2009

Search on the functions he gave on this forum and Wiki.


Re: NEED HELP! GameText Tutorial In-Game Help - XeoN_13 - 25.03.2009

Quote:
Originally Posted by Rk_
Search on the functions he gave on this forum and Wiki.
would people just stop repling to just say " search , look up in wiki , etc..?" com on now.. just dont reply because saying to "search" wont help. if ur going to reply help the person :S , at least thats my opinion.


Re: NEED HELP! GameText Tutorial In-Game Help - LarzI - 25.03.2009

They're supposed to learn


Re: NEED HELP! GameText Tutorial In-Game Help - XeoN_13 - 25.03.2009

i know but telling them to search isnt learning , mayby explaning things and how its done would be..


Re: NEED HELP! GameText Tutorial In-Game Help - Dol - 26.03.2009

Can someone please help me with this, I searched this up but I can't seem to get it right. Can someone please show me an example of how a tutorial like this is done?


Re: NEED HELP! GameText Tutorial In-Game Help - Oxside - 26.03.2009

Top of your script:
Код:
forward timeleft();
Onplayerspawn
Код:
public OnPlayerSpawn(playerid)
{
	if(gPlayerLogged[playerid])
	{
		SetPlayerSpawn(playerid);
	}
    TogglePlayerControllable(playerid,0);
    SetTimer("timeleft",1000,false); // On the place where is standing: 1000 = 1 second
    GameTextForPlayer(playerid, "~r~Do not deathmatch, revenge kill, bug abuse or hack.~n~", 3000, 4);
    GameTextForPlayer(playerid, "~r~You are also not allowed to metagame or powergame.~n~", 3000, 4);
    GameTextForPlayer(playerid, "~r~Have fun!", 3000, 4);
	return 1;
}
Somewhere else in your script:
Код:
public timeleft()
{
	TogglePlayerControllable(playerid,1);
}



Re: NEED HELP! GameText Tutorial In-Game Help - Dol - 26.03.2009

Thanks for the help but I got some errors!

Код:
C:\Users\Dol\Desktop\SA-MP Server\gamemodes\reverserp.pwn(1490) : warning 217: loose indentation
C:\Users\Dol\Desktop\SA-MP Server\gamemodes\reverserp.pwn(1495) : warning 217: loose indentation
C:\Users\Dol\Desktop\SA-MP Server\gamemodes\reverserp.pwn(16737) : error 017: undefined symbol "playerid"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.