SA-MP Forums Archive
Need little assistance. - 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)
+--- Thread: Need little assistance. (/showthread.php?tid=402554)



Need little assistance. - Laure - 27.12.2012

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.


Re: Need little assistance. - [HK]Ryder[AN] - 27.12.2012

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.");



Re: Need little assistance. - Laure - 27.12.2012

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


Re: Need little assistance. - [HK]Ryder[AN] - 27.12.2012

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.");