CLEO Help Some Problems

CLEO related
Status
Not open for further replies.

shanker

Well-known member
Joined
Sep 18, 2016
Messages
291
Reaction score
17
Location
Romania
Hi, why 0B37: samp 2@ = get_player_color 1@ is not running at all people?
for an example, i did an script "online server players", it is working at me perfectly but at some people no, they don't get the value of X players

there is two screenshots: http://imgur.com/a/JxzTD ( maded by me ,and it's working ) and http://i.imgur.com/PrYLUAa.png (look chat not dialog ) by another guy and .cs file not working for him, anyone know why? maybe different sampfuncs?


there is my script: https://www.dropbox.com/s/k4ixmn4yq5y4zls/online3.cs?dl=0

---------------------------------------

there's another mod who's doing the same thing but for me it not working but for others people it working .. fck it idk why :)) so i maded my mod ( check up ) but it working just for me :))

any value of every factions in the tabel i get "0", there's a screnshot with mod: http://i.imgur.com/ebiBKqe.png
download: http://www.mediafire.com/file/9wv2hbk54huanvg/online_members.cs ( source not opened , bad guy :(  )
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Probably because of your high use of $ global vars. If someone in another cleo mod uses $TOTAL and $TAXI etc. it will fuck things up in your cleo.
$var aka global vars, are accessible between all cleo scripts.

For me it works fine, http://i.imgur.com/pjLhAiX.png?1, because i don't have any other mods.

Also you could probably shorten the script by doing a single loop.

[shcode=cpp]
for 0@ = 0 to 1000
  if player_conected 0@
  then
      1@ = get_player_color 0@

      if 1@ == 77327373
      then 2@++
      end

      if 1@ == 69696969
      then 3@++ 
      end

      if 1@ == AFKCOLOR
      then 4@++
      end

      5@++ //all online players
      //etc. for each faction color
  end
end

0AF8: "faction x has %d online" -1 2@
0AF8: "faction y has %d online" -1 3@
0AF8: "%d online players, of which %d are AFK" -1 5@ 4@
[/shcode]
 
Status
Not open for further replies.
Top