more organizations can open gate - here is code help to fix!
#1

Hi, i want that pd, fbi i national guard can open this cate...

here is cmd

Quote:

if (strcmp(cmdtext, "/pdo", true)==0)
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 )
{
MoveObject(pdgate,1587.356,-1638.206,20.081, 8.0);
SendClientMessage(playerid, COLOR_GREEN, "OTPEN.");
}
else return SendClientMessage(playerid, COLOR_GREEN, "NOT A COP");
}
if (strcmp(cmdtext, "/pdc", true)==0)
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
MoveObject(pdgate,1587.937,-1637.896,15.189, 8.0);
SendClientMessage(playerid, COLOR_GREEN, "CLOSE");
}
else return SendClientMessage(playerid, COLOR_GREEN, "NOT A COP");
}

first this cmd was just for pd and everyone have diferent cmd for open, but now i want to all have same cmd...i try to add something like this but it didint work :S

Код:
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || (PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2))
any help?
Reply
#2

Show your full code. The method you posted should work
Reply
#3

Quote:
Originally Posted by buonggiorno
Hi, i want that pd, fbi i national guard can open this cate...

here is cmd

Quote:

if (strcmp(cmdtext, "/pdo", true)==0)
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 )
{
MoveObject(pdgate,1587.356,-1638.206,20.081, 8.0);
SendClientMessage(playerid, COLOR_GREEN, "OTPEN.");
}
else return SendClientMessage(playerid, COLOR_GREEN, "NOT A COP");
}
if (strcmp(cmdtext, "/pdc", true)==0)
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
MoveObject(pdgate,1587.937,-1637.896,15.189, 8.0);
SendClientMessage(playerid, COLOR_GREEN, "CLOSE");
}
else return SendClientMessage(playerid, COLOR_GREEN, "NOT A COP");
}

first this cmd was just for pd and everyone have diferent cmd for open, but now i want to all have same cmd...i try to add something like this but it didint work :S

Код:
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || (PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2))
any help?
the line have to be like this.
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)