SA-MP Forums Archive
Help quick please with command - 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: Help quick please with command (/showthread.php?tid=400388)



Help quick please with command - Yordan_Kronos - 18.12.2012

Hello i have one comand CMD:mech , this command is used from Mechanics (Job) and Vip Players.

How can i make do to use only from Mechanic. This is Command :

pawn Код:
CMD:mech(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pJob] != JOB_MECHANIC && !PlayerInfo[playerid][pVIP]) return SendClientMessage(playerid, COLOR_GREY, "You are not a mechanic.");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must be in a vehicle to use your mechanic tools.");
    ShowDialog(playerid, 9);
    return 1;
}



Re: Help quick please with command - Yiin - 18.12.2012

pawn Код:
CMD:mech(playerid, params[])
{
    if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
    if(PlayerInfo[playerid][pJob] != JOB_MECHANIC) return SendClientMessage(playerid, COLOR_GREY, "You are not a mechanic.");
    if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You must be in a vehicle to use your mechanic tools.");
    ShowDialog(playerid, 9);
    return 1;
}



Re: Help quick please with command - Yordan_Kronos - 18.12.2012

Thanks, very much.