HOW TO NAME OPEN GATE, NOT ORGANIZATION!? -
buonggiorno - 21.11.2009
Hi, i want to make gate at house that just owner i set can open it.
For example, when pd organization can open gate on his garage i have this line in cmd
Код:
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
but when i want that only for example John_McGrory can open gate, what i need to change in this line?or it i need change something what is not in this line can you tell me?
tnx alot
Re: HOW TO NAME OPEN GATE, NOT ORGANIZATION!? -
[LCG]TANKER - 21.11.2009
you would need to get the players name
if player name == so and so
then you can do a command and open/close
Re: HOW TO NAME OPEN GATE, NOT ORGANIZATION!? -
buonggiorno - 21.11.2009
so this
Код:
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
need to change into this
Код:
if(PlayerName[playerid] == John_McGrory)?
Re: HOW TO NAME OPEN GATE, NOT ORGANIZATION!? -
[LCG]TANKER - 21.11.2009
something like that, since i cant see your whole coding thats about all i can offer
Re: HOW TO NAME OPEN GATE, NOT ORGANIZATION!? -
buonggiorno - 21.11.2009
ok, this is my code for open pd gate
Код:
if (strcmp(cmdtext, "/pdo", true)==0)
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
MoveObject(pdkapija,1587.672,-1638.206,19.376, 8.0);
SendClientMessage(playerid, COLOR_GREEN, "OTVORILI STE KAPIJU.");
}
else return SendClientMessage(playerid, COLOR_GREEN, "NISTE POLICAJAC.");
}
if (strcmp(cmdtext, "/pdc", true)==0)
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
MoveObject(pdkapija,1587.842,-1638.253,15.155, 8.0);
SendClientMessage(playerid, COLOR_GREEN, "ZATVORILI STE KAPIJU");
}
else return SendClientMessage(playerid, COLOR_GREEN, "NISTE POLICAJAC.");
}
so, what to change that just one name can open gate?
Re: HOW TO NAME OPEN GATE, NOT ORGANIZATION!? -
[LCG]TANKER - 21.11.2009
i "think" not 100% positive
Код:
if (strcmp(cmdtext, "/pdo", true)==0)
{
if(GetPlayerName(playerid) == "name")
{
MoveObject(pdkapija,1587.672,-1638.206,19.376, 8.0);
SendClientMessage(playerid, COLOR_GREEN, "OTVORILI STE KAPIJU.");
}
else return SendClientMessage(playerid, COLOR_GREEN, "NISTE POLICAJAC.");
}
if (strcmp(cmdtext, "/pdc", true)==0)
{
if(GetPlayerName(playerid) == "name")
{
MoveObject(pdkapija,1587.842,-1638.253,15.155, 8.0);
SendClientMessage(playerid, COLOR_GREEN, "ZATVORILI STE KAPIJU");
}
else return SendClientMessage(playerid, COLOR_GREEN, "NISTE POLICAJAC.");
}
Re: HOW TO NAME OPEN GATE, NOT ORGANIZATION!? -
Namaco - 21.11.2009
i bet u helped another gf :{
Re: HOW TO NAME OPEN GATE, NOT ORGANIZATION!? -
[LCG]TANKER - 21.11.2009
lol i wouldnt dought it but heck its what i do :P