SA-MP Forums Archive
Help Not working - 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 Not working (/showthread.php?tid=318752)



Help Not working - Dark Crow - 16.02.2012

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!


Re: Help Not working - Slash_ - 16.02.2012

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


Re: Help Not working - Konstantinos - 16.02.2012

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;
}



Re: Help Not working - BleverCastard - 16.02.2012

EDIT: Dwane got there first. ^^


Re: Help Not working - Dark Crow - 20.02.2012

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


Re: Help Not working - deltapro - 20.02.2012

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