Can you see this -
Dezzzy - 31.10.2014
how can i make this command for fraction .. i want like if the player is not in fraction return him missage you are not in the faction .. here how this command looks like
And This Command
Код HTML:
if(strcmp(cmd, "/openb", true) == 0){
MoveObject(Bomji, 1162.3000000,-1650.7000000,12.9000000, 2);
SendClientMessage(playerid, COLOR_WHITE, "Bomj Gang Gate Gaixsna,Ar Dagaviwydet Daketva (/closeb)");
return 1;
}
if(strcmp(cmd, "/closeb", true) == 0){
MoveObject(Bomji, 1162.5000000,-1641.6000000,12.9000000, 2);
SendClientMessage(playerid, COLOR_WHITE, "Bomj Gang Gate Daiketa,Gasaxsnelad Daweret (/openb)");
return 1;
}
Re: Can you see this -
DanishHaq - 31.10.2014
Simply add a new line saying if the player is not in the faction. Add this after you check that the player typed /openb and /closeb, example:
pawn Код:
if(strcmp(cmd // ......
if(PlayerInfo[playerid][pFaction] != X) /* != means not equal to, and the X is where you put your faction number */ return /* by returning a value here it stops the code from going further */ SendClientMessage(playerid // .....
Re: Can you see this -
Dezzzy - 31.10.2014
i use this cmd
Код HTML:
if(strcmp(cmd, "/openb", true) == 0){
if(PlayerInfo[playerid][pLeader] == 25 || PlayerInfo[playerid][pMember] == 25) else return SendClientMessage(playerid, COLOR_YELLOW, "Shen Ar Xar Bomg Gang Wevri");
MoveObject(Bomji, 1162.3000000,-1650.7000000,12.9000000, 2);
SendClientMessage(playerid, COLOR_WHITE, "Bomj Gang Gate Gaixsna,Ar Dagaviwydet Daketva (/closeb)");
return 1;
}
and i got this errors
Код HTML:
C:\Users\Gigi\Desktop\1413562663_fuliox-rp\Fuliox-Rp\gamemodes\Fuliox-Rp.pwn(52142) : error 029: invalid expression, assumed zero
C:\Users\Gigi\Desktop\1413562663_fuliox-rp\Fuliox-Rp\gamemodes\Fuliox-Rp.pwn(52142) : warning 215: expression has no effect
C:\Users\Gigi\Desktop\1413562663_fuliox-rp\Fuliox-Rp\gamemodes\Fuliox-Rp.pwn(52142) : error 001: expected token: ";", but found "return"
C:\Users\Gigi\Desktop\1413562663_fuliox-rp\Fuliox-Rp\gamemodes\Fuliox-Rp.pwn(52143) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
[/HTML
52142 line is ---- if(PlayerInfo[playerid][pLeader] == 25 || PlayerInfo[playerid][pMember] == 25) else return SendClientMessage(playerid, COLOR_YELLOW, "Shen Ar Xar Bomg Gang Wevri");
52143 line is ---- MoveObject(Bomji, 1162.3000000,-1650.7000000,12.9000000, 2);
help please
Re: Can you see this -
dominik523 - 31.10.2014
I guess it this
pawn Код:
if(PlayerInfo[playerid][pLeader] == 25 || PlayerInfo[playerid][pMember] == 25) return SendClientMessage(playerid, COLOR_YELLOW, "Shen Ar Xar Bomg Gang Wevri");
And please use ZCMD.
Re: Can you see this -
Dezzzy - 31.10.2014
bro that pawn code is working compiled fine but problem is when i entered in a game .. my house interior was changed also when i get out it was flying in air and when i type that command it says tham im not leader
maybe before i got many warning and erros thats a faulse ?
Re: Can you see this -
dominik523 - 31.10.2014
ZCMD is way much better, and that's why I wrote that text which is a link to the thread. You can search for ZCMD tutorials, there are plenty of them.
Re: Can you see this -
Dezzzy - 31.10.2014
this code is working but everyboydy can open that gate and close it :::
Код HTML:
if(PlayerInfo[playerid][pLeader] == 25 || PlayerInfo[playerid][pMember] == 25) return SendClientMessage(playerid, COLOR_YELLOW, "Shen Ar Xar Bomg Gang Wevri");
Re: Can you see this -
silenthill - 31.10.2014
pawn Код:
if(strcmp(cmd, "/openb", true) == 0){
if(PlayerInfo[playerid][pLeader] == 25 || PlayerInfo[playerid][pMember] == 25) {
MoveObject(Bomji, 1162.3000000,-1650.7000000,12.9000000, 2);
SendClientMessage(playerid, COLOR_WHITE, "Bomj Gang Gate Gaixsna,Ar Dagaviwydet Daketva (/closeb)");
}else {
SendClientMessage(playerid, COLOR_YELLOW, "Shen Ar Xar Bomg Gang Wevri");
}
return 1;
}
Re: Can you see this -
Dezzzy - 31.10.2014
thanks it works
Код HTML:
if(strcmp(cmd, "/openb", true) == 0){
if(PlayerInfo[playerid][pLeader] == 25 || PlayerInfo[playerid][pMember] == 25) {
MoveObject(Bomji, 1162.3000000,-1650.7000000,12.9000000, 2);
SendClientMessage(playerid, COLOR_WHITE, "Bomj Gang Gate Igeba,Ar Dagaviwydet Daketva (/closeb)");
}else {
SendClientMessage(playerid, COLOR_YELLOW, "Shen Ar Xar Bomg Gang Wevri");
}
return 1;
}
if(strcmp(cmd, "/closeb", true) == 0){
if(PlayerInfo[playerid][pLeader] == 25 || PlayerInfo[playerid][pMember] == 25) {
MoveObject(Bomji, 1162.5000000,-1641.6000000,12.9000000, 2);
SendClientMessage(playerid, COLOR_WHITE, "Bomj Gang Gate Ixureba,Rom Gaxsnat Isev (/openb)");
}else {
SendClientMessage(playerid, COLOR_YELLOW, "Shen Ar Xar Bomg Gang Wevri");
}
return 1;
}
but how could i make like that command work only , if player is in range of point of
Код HTML:
1162.5000000,-1641.6000000,12.9000000
Re: Can you see this -
Quickie - 31.10.2014
pawn Код:
if(strcmp(cmd, "/openb", true) == 0)
{
if(PlayerInfo[playerid][pLeader] == 25 || PlayerInfo[playerid][pMember] == 25)
{
if(!IsPlayerInRangeOfPoint(playerid,10,1162.5000000,-1641.6000000,12.9000000))// notice the "!" sign? it reversed the return value of isplayerinrange
{// you can change the second parameter range IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z)
//SendClientMessage(playerid,-1,"youre not near to any gate"); // your sendclientmessage if the player is not near to that point
}
else
{
MoveObject(Bomji, 1162.3000000,-1650.7000000,12.9000000, 2);
SendClientMessage(playerid, COLOR_WHITE, "Bomj Gang Gate Igeba,Ar Dagaviwydet Daketva (/closeb)");
}
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Shen Ar Xar Bomg Gang Wevri");
}
return 1;
}
if(strcmp(cmd, "/closeb", true) == 0)
{
if(PlayerInfo[playerid][pLeader] == 25 || PlayerInfo[playerid][pMember] == 25)
{
if(!IsPlayerInRangeOfPoint(playerid,10,1162.5000000,-1641.6000000,12.9000000)) // notice the "!" sign? it reversed the return value of isplayerinrange
{// you can change the second parameter range IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z)
//SendClientMessage(playerid,-1,"youre not near to any gate");
}
else
{
MoveObject(Bomji, 1162.5000000,-1641.6000000,12.9000000, 2);
SendClientMessage(playerid, COLOR_WHITE, "Bomj Gang Gate Ixureba,Rom Gaxsnat Isev (/openb)");
}
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "Shen Ar Xar Bomg Gang Wevri");
}
return 1;
}