[HELP] AddPlayerClass
#9

Quote:
Originally Posted by MP2
Посмотреть сообщение
@Jonny5: https://sampforum.blast.hk/showthread.php?tid=57018 see 'assumptions'.

Here's an example, using an array. Note that I haven't tested this:

http://pastebin.com/r9jfYJUf

Remove all other AddPlayerClass lines from your mode as it will fuck this up, put your data in to the array in this format:

pawn Код:
{"NAME", skin, x, y, z, angle, weapon1, ammo1, weapon2, ammo2, weapon3, ammo3},
LOL i love how you link me to something you should read too,
your code makes the same assumptions but you have an array and enum.....

using
new var gCJ = AddStaticClass(....)

and checking the class == gCJ is the way not to assume



your code is in jeopardy of a array out of bounds,
because you assume no other scripts add a class.
Reply


Messages In This Thread
[HELP] AddPlayerClass - by Dubya - 08.06.2012, 23:50
Re: [HELP] AddPlayerClass - by Dubya - 09.06.2012, 00:07
Re: [HELP] AddPlayerClass - by SnG.Scot_MisCuDI - 09.06.2012, 00:08
Re: [HELP] AddPlayerClass - by MP2 - 09.06.2012, 00:09
Re: [HELP] AddPlayerClass - by Jonny5 - 09.06.2012, 00:10
Re: [HELP] AddPlayerClass - by MP2 - 09.06.2012, 00:11
Re: [HELP] AddPlayerClass - by Dubya - 09.06.2012, 00:22
Re: [HELP] AddPlayerClass - by SnG.Scot_MisCuDI - 09.06.2012, 00:36
Re: [HELP] AddPlayerClass - by Jonny5 - 09.06.2012, 15:09
Re: [HELP] AddPlayerClass - by MP2 - 09.06.2012, 23:22

Forum Jump:


Users browsing this thread: 1 Guest(s)