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



Making Tutorials - ToPhrESH - 15.07.2010

I was wondering how do you make tutorials. Like when you spawn it sets the camera position and says stuff.
I know a sort of sketch of how to do it

pawn Код:
public OnPlayerConnect
{
     SetCameraPos(playerid, X, Y, Z);
     SetCameraLookAt(playerid, X, Y, Z);
     return 1;
}
So is it something like that because once i start them i dont know how to end them


Re: Making Tutorials - (SF)Noobanatior - 15.07.2010

sonething like
Код:
at the top: new bool:tut[MAX_PLAYERS];

under:onplayerconnect(playerid) {
tut[playerid]=true;
}

under: onplayerrequestclass(... ) {
 if(tut[playerid] == true){
     SetPlayerPos(playid,x,y,z);
     TogglePlayerSpectating(playerid,true);
     //say stuff textdraws whatever
 }
}
//----------------------------------------

 //then to stop it go 
tut[playerid] = false;
TogglePlayerSpectating(playerid,false);
ForceClassSelection(playerid);
SpawnPlayer(playerid);  //not 100% if this is required or not
how's that


Re: Making Tutorials - ToPhrESH - 15.07.2010

well then where would we add the

tut[playerid] = false;
TogglePlayerSpectating(playerid,false);
ForceClassSelection(playerid);
SpawnPlayer(playerid); //not 100% if this is required or not


Re: Making Tutorials - (SF)Noobanatior - 15.07.2010

do it after they do there last bit of the tut or run a timer to do it 10secs after the last msgs or something


Re: Making Tutorials - ToPhrESH - 16.07.2010

Ok yesi think so....thanks alot


Re: Making Tutorials - ToPhrESH - 16.07.2010

i want it to happnd to only new players. how do i check if somone is registered