04.05.2013, 18:19
When i put this on register script:
Newbie[playerid] = true;
Then, how check OnPlayerSpawn is true or false?
Newbie[playerid] = true;
Then, how check OnPlayerSpawn is true or false?
if(Newbie[playerid]== true)
{
//what you need?
}
if(Newbie[playerid] == true)//Checks if the condition is true
{
//code
}
if(Newbie[playerid] != true)//Checks if the condition isn't true
{
//code
}
if(Newbie[playerid]) // If it's true
if(!Newbie[playerid]) // If it's false
Newbie[playerid] =! Newbie[playerid]; // Inverts the state. True --> False, if false --> true.
D:\Edvinas\RPG\gamemodes\RPG.pwn(39) : error 021: symbol already defined: "Naujokas" D:\Edvinas\RPG\gamemodes\RPG.pwn(86) : error 028: invalid subscript (not an array or too many subscripts): "Naujokas" D:\Edvinas\RPG\gamemodes\RPG.pwn(86) : warning 215: expression has no effect D:\Edvinas\RPG\gamemodes\RPG.pwn(86) : error 001: expected token: ";", but found "]" D:\Edvinas\RPG\gamemodes\RPG.pwn(86) : error 029: invalid expression, assumed zero D:\Edvinas\RPG\gamemodes\RPG.pwn(86) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors. |
new bool:Naujokas[MAX_PLAYERS]; |
public OnPlayerSpawn(playerid) { if(Naujokas[playerid]==true) { } return 1; } |