Help Not working
#1

i have a command only for donators but when someone types /donator1,2,3 they get the guns even if they aren't donators

Код:
	if(strcmp(cmd, "/donator1", true) == 0)
   {
       if(IsPlayerConnected(playerid))
       if(PlayerInfo[playerid][pDonateRank] > 1)
       {
                     SendClientMessage(playerid, COLOR_GREY, "   Wait 5 min till you can use the donator Packet  ! ");
                     return 1;
                 }

       {          if(JustUsed[playerid] == 1)
	              GivePlayerWeapon(playerid, 24, 100);
                  JustUsed[playerid] = 1;
                  SetTimerEx("PaketReset", 300000, false, "i", playerid);
       }
       return 1;
   }
Can anyone help i added also the timer but it doesn't work also if anyone know what the problem is pls let me know so i can fix it!
Reply
#2

i think u need to give them a rank\level through the admin system, not sure
Reply
#3

pawn Код:
if(strcmp(cmd, "/donator1", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pDonateRank] > 1) SendClientMessage(playerid, COLOR_GREY, "   Wait 5 min till you can use the donator Packet  ! ");
        else SendClientMessage(playerid, COLOR_GREY, "You are not Donator!");
        if(JustUsed[playerid] == 1) GivePlayerWeapon(playerid, 24, 100);
        JustUsed[playerid] = 1;
        SetTimerEx("PaketReset", 300000, false, "i", playerid);
    }
    return 1;
}
Reply
#4

EDIT: Dwane got there first. ^^
Reply
#5

it still gives them the guns it first gives them the message "Your not a donator" then when typed again it gives them the guns
Reply
#6

pawn Код:
SetTimerEx("ResetPacket", 300000, false, "i", playerid); // 300000 = 5min .. You can change :)
Don't forget to define resetpacket
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)