Function not working?
#1

Hi all,i'm making a "Crazy hour script" and i need little help.


I make this:

If server reach 70 players,the script wil activate the functions i write (ex. free health,new skin,weapons and etc.)

I tried on my local server,by lowering the player count to test the script,but dont work.

Ex: I tried:

Free armor.

Free sawnoff. Just for test,and nothing,both of this don't work.

Here is the script:

The new:

new pCount;

and the rest:

Код:
public OnPlayerConnect(playerid)
{
     	pCount++;
        return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    pCount--;
	return 1;
}

forward pChecking();
public pChecking()
{
	if(pCount >= 2)
	{
	   SendClientMessageToAll(RED, "Crazy Hour script activated.");
           GivePlayerWeapon(playerid, 26, 500);
           SetPlayerArmour(playerid, 100);
	   print("3 Players Joined!");
	}
	return 1;
}
Thanks for help.
Reply
#2

BUMP...Please it's pretty urgent,sorry..
Reply
#3

..........buummpp lool
Reply
#4

pawn Код:
if(pCount >= 2){
  SendClientMessageToAll(RED, "Crazy Hour script activated.");
  for (new i=0; i<MAX_PLAYERS;i++){
    If (!IsPlayerConnected(i)) continue;
    GivePlayerWeapon(i, 26, 500);
    SetPlayerArmour(i, 100);
  }
  print("3 Players Joined!");
}
return 1;
Reply
#5

Tried but:

Код:
C:\Documents and Settings\k\Desktop\crazy.pwn(84) : error 017: undefined symbol "If"
C:\Documents and Settings\k\Desktop\crazy.pwn(84) : error 001: expected token: ";", but found "continue"
C:\Documents and Settings\k\Desktop\crazy.pwn(85) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#6

pawn Код:
forward pChecking();
public pChecking()
{
    if(pCount >= 2)
    {
       SendClientMessageToAll(RED, "Crazy Hour script activated.");
           GivePlayerWeapon(playerid, 26, 500);
           SetPlayerArmour(playerid, 100);
       print("3 Players Joined!");
    }
    return 1;
}
Did you assign a timer?
Reply
#7

Nope,no timer in.
Reply
#8

Quote:
Originally Posted by Logitech90
Посмотреть сообщение
Nope,no timer in.
Well add a timer?
Reply
#9

How to?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)