SA-MP Forums Archive
Weird problem - 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: Weird problem (/showthread.php?tid=615319)



Weird problem - Nin9r - 20.08.2016

Hi !

1. I need some help with some variables. For example, I have pJob variable default 0. I use /getjob, pJob gets a value (jobid) 1,2,3,4,5... After relog(sometimes), dead(sometimes) or few time it disappear. Gets pJob value 0 again. I searched for pJob = 0; on the entire gamemode and i didn't find anything. The same problem with skins, i will be spawned after dead with a random skin event if i don't use a random function.

2. I use a count function to see how many players are playing paintball. InPaint[playerid] = 1; when a player is entering in area. Sometimes the player gets value 1 and sometimes he needs to enter for two, three times to gets that value, why?;

Any ideas ?


Re: Weird problem - Shinja - 20.08.2016

1. Make sure you defining pJob for MAX_PLAYERS
2. Maybe desync can do it, or mistakes in script


Re: Weird problem - Nin9r - 20.08.2016

I use
Код HTML:
enum playervEnum {
	Float: pHealth,
        pJob,
        pLevel, etc...
I am sure that is a mistake, but I don't know where. I didn't use pJob] = 0 anywhere, also pSkin] = 0 etc.

How can I see if desync makes it? Any plugin or something?


Re: Weird problem - Nin9r - 21.08.2016

I saw that pJob gets random value for all the players. For example, a player will have after spawn/relog or after few time pJob] = 97, another one has pJob] = 114 etc. Those id's doesn't exist. I checked pJob = on the entire gamemode and ai don't use a random function for this variable.


Re: Weird problem - Nin9r - 24.09.2016

bump