SA-MP Forums Archive
Parole 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Parole Command (/showthread.php?tid=219884)



Parole Command - Unknown123 - 02.02.2011

I get this message (Only Law Enforcement can use this command) when im COP and trying /parole

pawn Код:
else if(gTeam[playerid] != TEAM_COP || gTeam[playerid] != TEAM_AIRCOP || gTeam[playerid] != TEAM_MARINECOP || gTeam[playerid] != TEAM_SWAT || gTeam[playerid] != TEAM_ARMY) return SendClientMessage(playerid, COLOR_ERROR, "Only Law Enforcement can use this command");



Re: Parole Command - Steven Paul - 02.02.2011

are you sure you have wrote TEAM_COP earlier


Re: Parole Command - Fool - 02.02.2011

Can we see the WHOLE Command?


Re: Parole Command - Unknown123 - 02.02.2011

Quote:
Originally Posted by Porsche911
Посмотреть сообщение
Can we see the WHOLE Command?
Sure :]

pawn Код:
dcmd_parole(playerid, params[])
{
    new targetid, string[128];
   
    new playername[MAX_PLAYER_NAME], targetname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    GetPlayerName(targetid, targetname, sizeof(targetname));

    if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, COLOR_USAGE, "USAGE: /parole (id)");
    else if(gTeam[playerid] != TEAM_COP || gTeam[playerid] != TEAM_AIRCOP || gTeam[playerid] != TEAM_MARINECOP || gTeam[playerid] != TEAM_SWAT || gTeam[playerid] != TEAM_ARMY) return SendClientMessage(playerid, COLOR_ERROR, "Only Law Enforcement can use this command");
    else if(targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_ERROR, "Invalid ID");
    else if(IsSpawned[playerid] == 0) return SendClientMessage(playerid, COLOR_ERROR, "You are dead. You cannot use this command");
    else if(Jailed[playerid] == 1) return SendClientMessage(playerid, COLOR_ERROR, "You cannot use this command in jail");
    else if(Alcatraz[targetid] == 1)
    {
        format(string, sizeof(string), "%s(%d) is on alcatraz. You cannot parole that player", targetname, targetid);
        SendClientMessage(playerid, COLOR_ERROR, string);
    }
    else if(Jailed[targetid] == 0)
    {
        format(string, sizeof(string), "%s(%d) is not in jail",targetname, targetid);
        SendClientMessage(playerid, COLOR_ERROR, string);
        return 1;
    }
    else
    {
        //sends the shit
        //info
        //ect
        return 1;
    }
    return 1;
}



Re: Parole Command - Larsey123IsMe - 02.02.2011

NVM, Sorry


Re: Parole Command - Macluawn - 02.02.2011

use && instead of ||


Re: Parole Command - Unknown123 - 02.02.2011

Thanks