How to make a tutorial script - 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: How to make a tutorial script (
/showthread.php?tid=205485)
How to make a tutorial script -
Jordan Smith - 01.01.2011
Hey i am looking for it ages and ages but not finding it. Anyone can help me
Re: How to make a tutorial script -
06leachr - 01.01.2011
Ironic looking for a tutorial on how to make a tutorial
Re: How to make a tutorial script -
Grim_ - 01.01.2011
It's simple really:
- Check between the steps the player is in
- Between each step, send the player messages accordingly
- Between each step, set the players position, camera position, and camera look-at
And when the player gets to the last step of the tutorial, simply spawn them or whatever. All that is required is a variable to hold the steps and the positions of the player, camera and camera look-at.
Re: How to make a tutorial script -
Jordan Smith - 01.01.2011
but how will the make a that
Re: How to make a tutorial script -
Jordan Smith - 01.01.2011
so no one. I need this urgent
Re: How to make a tutorial script -
Grim_ - 01.01.2011
pawn Код:
// top of script
new pStep[ MAX_PLAYERS ];
// somewhere, like after registering
SetUpPlayer( playerid );
// Bottom of script
forward SetUpPlayer( playerid );
public SetUpPlayer( playerid )
{
switch( pStep[ playerid ] )
{
case 0:
{
// ..
// SendClientMessage( ... );
// SetPlayerCameraPos( ... );
// etc
}
case 1:
{
// Next step, add in this information
}
}
pStep[ playerid ] ++;
if( pStep[ playerid ] == 5 ) // Change the '5' to the amount of steps the tutorial will have
{
SpawnPlayer( playerid );
pStep[ playerid ] = 0;
}
else
{
SetTimerEx( "SetUpPlayer", 10000, false, "i", playerid ); // JChange the '10000' to the amount of time between steps
}
return 1;
}
This is an outline of what you need to do.
Do not simply copy and paste the code - build off of it.
Re: How to make a tutorial script -
Jordan Smith - 01.01.2011
thanks. I was waiting for something like this