my donator system will not update ?
#1

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;
    } 
Reply
#2

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?
Reply
#3

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
Reply
#4

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
Reply
#5

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
Reply
#6

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
Reply
#7

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


Forum Jump:


Users browsing this thread: 1 Guest(s)