more organizations can open gate - here is code help to fix! - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: more organizations can open gate - here is code help to fix! (
/showthread.php?tid=113816)
more organizations can open gate - here is code help to fix! -
buonggiorno - 16.12.2009
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?
Re: more organizations can open gate - here is code help to fix! -
dice7 - 16.12.2009
Show your full code. The method you posted should work
Re: more organizations can open gate - here is code help to fix! -
whitedragon - 16.12.2009
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)