Help with checkpoints - 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: Help with checkpoints (
/showthread.php?tid=127419)
Help with checkpoints -
Roperr - 13.02.2010
I'm stuck.
I need a checkpoint that only 1 class could use
The checkpoint should have 15 sec timer.
The timer should start/stop when the player enteres/exits the checkpoint.
After the time is up it should say : "Objective accomplished, you have successfully hacked the computers".
Can somebody please help me?
I've been asking about this all over.
Re: Help with checkpoints -
bajskorv123 - 13.02.2010
I made a little base for it, hope it helped
pawn Код:
//Above main()
new Hacker[MAX_PLAYERS];
new Class[MAX_PLAYERS];
//OnPlayerRequestClass(playerid, classid)
Class[playerid] = classid; //Assigns Class to the classid
//OnPlayerSpawn(playerid)
switch(Class[playerid])
{
case Id:// If the spawned player has the hacker class id, make them a Hacker.
{
Hacker[playerid] = 1;
}
}
Help with classid:
Your first
On GameModeInit() is classid 0
Your second
On GameModeInit() is classid 1
Your third
On GameModeInit() is classid 2
And so on. Hope this helped
Re: Help with checkpoints -
Roperr - 13.02.2010
Thank you for your help.
Re: Help with checkpoints -
Roperr - 13.02.2010
Now I need some more help.
When a player enters a checkpoint how to make it check if it's a hacker?
So only hackers can hack that thing.
OnPlayerEnterCheckpoint
IsPlayerHacker .. or anything like that?
Re: Help with checkpoints -
bajskorv123 - 13.02.2010
pawn Код:
//OnPlayerEnterCheckpoint(playerid)
if(Hacker[playerid] == 1)
{
// What happens if the person who entered cp is a hacker
}
else
{
// What happens if the person who entered cp not is a hacker
}
Re: Help with checkpoints -
Roperr - 13.02.2010
Wow man thank you, you just helped me a lot.
I have been asking this for weeks.