Need little assistance.
#1

Alright here i have a command which i also want to be used by a new faction i added but how i did didnt work can you guys provide some help?Here is the code.
pawn Код:
new string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsACop(playerid) || !IsANG(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a LEO!"); // Here i tried to add but didnt work
    //if(!PlayerInfo[playerid][pFacDuty]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command while being in a vehicle.");
Thanks in advance.
Reply
#2

try this
pawn Код:
new string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsACop(playerid) && !IsANG(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a LEO!"); // Here i tried to add but didnt work
    //if(!PlayerInfo[playerid][pFacDuty]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command while being in a vehicle.");
Reply
#3

Yea this worked also if want another faction too there then sud i use the same?
Reply
#4

Quote:
Originally Posted by Imperor
Посмотреть сообщение
Yea this worked also if want another faction too there then sud i use the same?
then do this.
NOTE : change isfact by ur faction thing
pawn Код:
new string[128];
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(!IsACop(playerid) && !IsANG(playerid) && !IsFact(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command unless you're a LEO!"); // Here i tried to add but didnt work
    //if(!PlayerInfo[playerid][pFacDuty]) return SendClientMessage(playerid, COLOR_GREY, "You are not on duty.");
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't use this command while being in a vehicle.");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)