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(playerid, newstate, oldstate)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
if(PermInfo[playerid][pDonator] < 1)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1);
}
if(PermInfo[playerid][pDonator] < 0)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 0);
}
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(playerid, newstate, oldstate)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
if(PermInfo[playerid][pDonator] < 1)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1);
}
if(PermInfo[playerid][pDonator] < 0)
{
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SHOTGUN, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SPAS12_SHOTGUN, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 0);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 0);
}
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