SA-MP Forums Archive
my donator system will not update ? - 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: my donator system will not update ? (/showthread.php?tid=529371)



my donator system will not update ? - UserName31 - 02.08.2014

hey i dont know whymy donator system wont set the player weapon skills to 1 when admin give them the donation status ok here my code is under onplayerchangestate i dont know if its better with a time ?

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        if(
PermInfo[playerid][pDonator] < 1)
        {
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SAWNOFF_SHOTGUN1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_PISTOL1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_PISTOL_SILENCED1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_DESERT_EAGLE1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SHOTGUN1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SPAS12_SHOTGUN1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MICRO_UZI1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MP51);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_AK471);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_M41);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MP51);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SNIPERRIFLE1);
            }
        if(
PermInfo[playerid][pDonator] < 0)
        {
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SAWNOFF_SHOTGUN0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_PISTOL0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_PISTOL_SILENCED0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_DESERT_EAGLE0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SHOTGUN0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SPAS12_SHOTGUN0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MICRO_UZI0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MP50);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_AK470);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_M40);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MP50);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SNIPERRIFLE0);
        }
return 
1;
    } 



Re: my donator system will not update ? - youssefehab500 - 02.08.2014

Quote:
Originally Posted by UserName31
Посмотреть сообщение
hey i dont know whymy donator system wont set the player weapon skills to 1 when admin give them the donation status ok here my code is under onplayerchangestate i dont know if its better with a time ?

PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        if(
PermInfo[playerid][pDonator] < 1)
        {
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SAWNOFF_SHOTGUN1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_PISTOL1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_PISTOL_SILENCED1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_DESERT_EAGLE1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SHOTGUN1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SPAS12_SHOTGUN1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MICRO_UZI1);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MP51);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_AK471);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_M41);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MP51);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SNIPERRIFLE1);
            }
        if(
PermInfo[playerid][pDonator] < 0)
        {
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SAWNOFF_SHOTGUN0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_PISTOL0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_PISTOL_SILENCED0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_DESERT_EAGLE0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SHOTGUN0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SPAS12_SHOTGUN0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MICRO_UZI0);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MP50);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_AK470);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_M40);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_MP50);
            
SetPlayerSkillLevel(playeridWEAPONSKILL_SNIPERRIFLE0);
        }
return 
1;
    } 
< 1 and < 0
wut do u mean by that that if his donor lvl less than 0 and the other less than 1 O.o?


Re: my donator system will not update ? - UserName31 - 02.08.2014

Quote:
Originally Posted by youssefehab500
Посмотреть сообщение
< 1 and < 0
wut do u mean by that that if his donor lvl less than 0 and the other less than 1 O.o?
i tryed to change it to == but it dont work i tryed <= and => and >= nothing works i want it to as soon as they get the donation status they will get there 2 guns


Re: my donator system will not update ? - youssefehab500 - 02.08.2014

Quote:
Originally Posted by UserName31
Посмотреть сообщение
i tryed to change it to == but it dont work i tryed <= and => and >= nothing works i want it to as soon as they get the donation status they will get there 2 guns
is the "1" the donor lvl u want them to be givin the weapons when they get it ? if so then change the < 1) to >= 1) if not explain more plz


Re: my donator system will not update ? - Cannary2048 - 02.08.2014

It's simply because you're setting SkillLevel to 0 for non-donator and 1 for donator, that won't make any difference, set the skill level for non-donator to 1, and donator to 999


Re: my donator system will not update ? - UserName31 - 02.08.2014

Quote:
Originally Posted by youssefehab500
Посмотреть сообщение
is the "1" the donor lvl u want them to be givin the weapons when they get it ? if so then change the < 1) to >= 1) if not explain more plz
OH NO THE ONE IS 1337


Re: my donator system will not update ? - youssefehab500 - 02.08.2014

Quote:
Originally Posted by UserName31
Посмотреть сообщение
OH NO THE ONE IS 1337
then change the non doner to 1 and the doner to the 1337