08.11.2010, 07:32
I have a nice problem with zcmd and `if`
For most of commands i use check
So there is big problem. I set for my character `pMember` to 1. Ofcourse `pLeader` i leave alone and it is 0.
When doing command it wont pass check if i have `pMember` - `1`
if `pLeader` is 1 and `pMembe`r is 0 it works. Also it works if bouth of them are setted to 1.
So whats the problem?
pMember check works in other script parts like onpolayerspawn callback etc.
For most of commands i use check
pawn Код:
if(PlayerInfo[playerid][pMember] != 1 || PlayerInfo[playerid][pLeader] != 1) return SendClientMessage(playerid, COLOR_GRAD1, "* You are not a cop.");
When doing command it wont pass check if i have `pMember` - `1`
pawn Код:
if(PlayerInfo[playerid][pMember] != 1 || PlayerInfo[playerid][pLeader] != 1) return SendClientMessage(playerid, COLOR_GRAD1, "* You are not a cop.");
//the code wont be used if `pMember` is 1 and `pLeader` is 0
So whats the problem?
pMember check works in other script parts like onpolayerspawn callback etc.