SA-MP Forums Archive
Updating Skill - 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: Updating Skill (/showthread.php?tid=504323)



Updating Skill - vassilis - 03.04.2014

fixed


Re: Updating Skill - Chrillzen - 03.04.2014

Because the player doesn't have any of those amounts of TotalRobs?


Re: Updating Skill - vassilis - 03.04.2014

........................


Re: Updating Skill - ]Rafaellos[ - 03.04.2014

Show us where do you use it. Also you can write this way, which it's easier for my opinion.

pawn Код:
switch(pinfo[playerid][TotalRobs])
{
    case 5, 10, 20, 25, 30, 35:
    {
        pinfo[playerid][Robskill]++;
    }
}
Edit: Show us the loading too, maybe you are not loading it correctly.


Re: Updating Skill - vassilis - 03.04.2014

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
Show us where do you use it. Also you can write this way, which it's easier for my opinion.

pawn Код:
switch(pinfo[playerid][TotalRobs])
{
    case 5, 10, 20, 25, 30, 35:
    {
        pinfo[playerid][Robskill]++;
    }
}
indeed its easier but anyway i am not using it anywhere should i use it OnPlayerUpdate or to every command i use for robberies?


Re: Updating Skill - ]Rafaellos[ - 03.04.2014

Is not going to be a good idea if you will use it under OnPlayerUpdate, it's pointless too. Use it after a player finish a robbery.


Re: Updating Skill - vassilis - 03.04.2014

Quote:
Originally Posted by ]Rafaellos[
Посмотреть сообщение
Is not going to be a good idea if you will use it under OnPlayerUpdate, it's pointless too. Use it after a player finish a robbery.
I see so on the timer i use for robbery finish?


Re: Updating Skill - ]Rafaellos[ - 03.04.2014

Yeap. The TotalRobs variable will change only after a player finish a robbery. That's why you don't need it under OnPlayerUpdate.


Re: Updating Skill - vassilis - 03.04.2014

not working


Re: Updating Skill - ]Rafaellos[ - 03.04.2014

Are you sure TotalRobs variable is loaded correctly?