Help with checkpoints
#1

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.
Reply
#2

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
pawn Код:
AddPlayerClass()
On GameModeInit() is classid 0
Your second
pawn Код:
AddPlayerClass()
On GameModeInit() is classid 1
Your third
pawn Код:
AddPlayerClass()
On GameModeInit() is classid 2
And so on. Hope this helped
Reply
#3

Thank you for your help.
Reply
#4

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?
Reply
#5

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
}
Reply
#6

Wow man thank you, you just helped me a lot.
I have been asking this for weeks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)