SetPlayerSkillLevel Help !
#1

Problem:

As i scripted it it has to change the skill level of the player when he reaches 4500 score like instead of wielding 1 handed pistol he wields 2 when he reaches 4500 score so i made it but it always applies at all scores less than 4500 and more than 4500 while it has to be like i said

My Code
pawn Код:
if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 4499)
    {
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 2);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1);
        return 1;
    }
if(GetPlayerScore(playerid) >= 4500)
    {
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 2);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 2);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 2);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 2);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 2);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 2);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 2);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 2);
        return 1;
    }
My Code is under:
pawn Код:
public OnPlayerSpawn(playerid)
{
    return 1;
}
Fast Help Please !
Reply
#2

Help Heree?
Reply
#3

06:52 PM

07:19 PM

Stop bumping, you obviously cannot wait worth shit. I want to see how you are at school.

"WHEN THE FUCK DO WE GET OUR HOMEWORK?" - You.
Reply
#4

Quote:
Originally Posted by Kindred
Посмотреть сообщение
06:52 PM

07:19 PM

Stop bumping, you obviously cannot wait worth shit. I want to see how you are at school.

"WHEN THE FUCK DO WE GET OUR HOMEWORK?" - You.
Better Post a useful thing? than saying shit? and second time be polite
Reply
#5

pawn Код:
if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 4499)
    {
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 2);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1);
        return 1;
    }
if(GetPlayerScore(playerid) >= 4500)
    {
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 999);
        return 1;
    }
// Skill Level 999 is Dual Weapon skill
// Skill Level 1 is normal ;')
Laalal just easy xd
Reply
#6

Explanation: The skill levels range from 0-999, where 0 is the worst skill. To use two weapons the skill needs to be maxed out (999) just like in single player.
Reply
#7

Quote:
Originally Posted by Kathleen
Посмотреть сообщение
pawn Код:
if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < 4499)
    {
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 2);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 1);
        return 1;
    }
if(GetPlayerScore(playerid) >= 4500)
    {
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 999);
SetPlayerSkillLevel(playerid, WEAPONSKILL_SNIPERRIFLE, 999);
        return 1;
    }
// Skill Level 999 is Dual Weapon skill
// Skill Level 1 is normal ;')
Laalal just easy xd
Facing another problem..

which is that becuz i put it under onplayerspawn so in my GM the coommand need to check whether ur spawned or not so onplayerspawn there the variable isplayerspawned=1 so when i put this code above it it buggs it so when ever i type a command it says i am not spawned so any help?
Reply
#8

Try to put it under
"public OnPlayerConnect(playerid)"
Reply
#9

Quote:
Originally Posted by Kathleen
Посмотреть сообщение
Try to put it under
"public OnPlayerConnect(playerid)"
@Kathleen Now it doesnt work completely either by haing score less than 4500 or having more than 4500 !! please help?
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)