Let only VIP's and Admins use a specific command.
#1

Right now, i have:
pawn Код:
if(AccInfo[playerid][Level] >=1) AccInfo[playerid][pVip] > 0)
        {
But this only lets the person use the command if he is BOTH VIP and Admin.
How do i make it so the player only has to be 1 of them. (VIP, Admin)

Thanks.
Reply
#2

pawn Код:
if(AccInfo[playerid][Level] >=1 || AccInfo[playerid][pVip] > 0)
{
try that
Reply
#3

pawn Код:
if(AccInfo[playerid][Level] >=1 || AccInfo[playerid][pVip] > 0)
Reply
#4

Oh i see those two || is all I needed.

Okay, works good now.
Reply
#5

Welcomes .
Reply
#6

I have 1 more problem, maybe you or anyone may be able to figure it out.

I want to restrict anyone from spawning as this class without having 2000 score, can it be done?
Doesn't seem to be working for me, the second dialog still appears, and refuses to prompt for 2000 score.


pawn Код:
case 6:
                {

                    if(GetPlayerScore(playerid) < 2000)
                        {
                    gTeam[playerid] = T_SPECIAL;
                    SetPlayerColor(playerid, C_GREY);
                    GameTextForPlayer(playerid, "~r~US Army", 3000, 3);
                    //ShowPlayerDialog(playerid, Skin_Dialog, DIALOG_STYLE_LIST, "Select a Skin", "", "Choose", "");
                    SetSpawnInfo(playerid, 0, 121, -1217.3820,1493.2750,21.6103,280.8538, 0, 0, 0, 0, 0, 0);
                    }
                    else
                    {
                    SendClientMessage(playerid, C_RED, "You need 2000 score to become US Army.");
                    return ShowPlayerDialog(playerid, Team_Dialog, DIALOG_STYLE_LIST, "{33AA33}Team Selection", "{15FF00}England\n{FF0000}Soviet Union\n{FFFF00}Taliban Cell\n{0000BB}United States\n{A86EFC}Australian Armada\n{FF9900}European Alliance\n{AFAFAF}US Army", "Choose", "");
                    }
                }
            }
            ShowPlayerDialog(playerid, Class_Dialog, DIALOG_STYLE_LIST, "{15FF00}Class Selection", "Assault\nMedic             \t{FF0000}(Score: 50)\nSniper            \t{FF0000}(Score: 300)\nAnti-Tank         \t{FF0000}(Score: 500)\nSpy               \t{FF0000}(Score: 2500)\nPilot          \t{FF0000}(Score: 6500)\nEngineer          \t{FF0000}(Score: 1000)\nSpecial Operations\t{FF0000}(Score: 10000)", "Choose", "");
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)