SA-MP Forums Archive
Little help! - 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: Little help! (/showthread.php?tid=481371)



Little help! - Sanady - 15.12.2013

Hello everybody.I have problem with suming weapon skill levels...When I add variable +1 it`s not adding that number he is just reading from variable.Here is code please check it:

pawn Код:
if(GetPlayerWeapon(killerid) == 24) // deagle
    {
        SetPlayerSkillLevel(killerid,2,pInfo[killerid][pSkillDesert]+1);
        format(slova,sizeof(slova),"{D4FF00}[Gun Skills] {FFFFFF}Your current skill level of Desert-Deagle is: %d .",pInfo[killerid][pSkillDesert]);
        SendClientMessage(killerid,0xFFFFFFFF,slova);
    }



Re: Little help! - Kyle - 15.12.2013

Use += 1.


Re: Little help! - Zamora - 15.12.2013

pawn Код:
SetPlayerSkillLevel(killerid,2,pInfo[killerid][pSkillDesert]+1);
Instead of this do it
pawn Код:
pInfo[killerid][pSkillDesert] ++;



Re: Little help! - Sanady - 15.12.2013

Quote:
Originally Posted by KyleSmith
Посмотреть сообщение
Use += 1.
Thanks