i need help...
#1

whats wrong and here guys for me this command works clearly but for the other player dont work when he will tupe /repair nothing happens and no sending message btw he is id 0..

pawn Код:
CMD:repair(playerid, params[])
{
    if(IsPlayerAdmin2[playerid] == 2)
    {
        if(IsPlayerVip[playerid] == 2)
        {
            if(GetPVarInt(playerid,"CMDABUSE") > GetTickCount()) return SendClientMessage(playerid, COLOR_WHITE,"You must wait before using a command");
            SetPVarInt(playerid,"CMDABUSE",GetTickCount()+90000);
            {
                new car = GetPlayerVehicleID(playerid);
                RepairVehicle(car);
                return 1;
            }
        }
    }
    return 1;
}
Sorry for my bad english ..
Thanks xD
Reply
#2

Since your involving "IsPlayerVip" Are you sure that others are also VIP level +2 on your server?


[EDIT:
Maybe this is what you are trying to make:
If playerid has Admin Level == 2 |OR| has VIP Level == 2 then the function will be continue.


pawn Код:
CMD:repair(playerid, params[])
{
    if(IsPlayerAdmin2[playerid] == 2 || IsPlayerVip[playerid] == 2)
    {
        if(GetPVarInt(playerid,"CMDABUSE") > GetTickCount()) return SendClientMessage(playerid, COLOR_WHITE,"You must wait before using a command");
        SetPVarInt(playerid,"CMDABUSE",GetTickCount()+90000);
        {
            new car = GetPlayerVehicleID(playerid);
            RepairVehicle(car);
            return 1;
        }
    }
    return 1;
}
]
Reply
#3

yeah maybe its like this but he have and vip rights and admin rights and still cant using the command
btw ill try this and ill post a comment here ..
Reply
#4

Thanks dude it works xD
Reply
#5

Quote:
Originally Posted by Rafa
Посмотреть сообщение
Thanks dude it works xD
Welcome dude .
Try studying the link underneath, it helped me alot in scripting knownledge. And if your intrested read the whole page, for me it was very intresting and helpfull.
https://sampwiki.blast.hk/wiki/Control_Structures#Operators
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)