simple 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: simple help (
/showthread.php?tid=575633)
simple help -
sscarface - 28.05.2015
PHP код:
for(new i=1; i<28; i++)
{
Streamer_SetIntData(STREAMER_TYPE_MAP_ICON, i, E_STREAMER_STYLE, 1);
}
What does "28" means? I'm new at scripting so i want to know. It's max players? or what. Please explain.
ALSO:
PHP код:
CreateDynamicMapIcon(1368.447021, -1279.782470, 13.546875, 6, -1, -1, -1, -1, 100, MAPICON_GLOBAL);
Код:
C:\Users\Noman\Downloadscnr.pwn(9624) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Re: simple help -
sscarface - 28.05.2015
bump. anyone help i need it now?
Re: simple help -
sscarface - 28.05.2015
are you guyz serious? I really need help. Someone help here.
Re: simple help -
PeterJane - 28.05.2015
1. -
https://wiki.alliedmods.net/Pawn_tutorial#For_Loops
2. - Place it on OnGameModeInit
I compiled without errors.
P.S. - Update if necessary
https://github.com/samp-incognito/sa...ses/tag/v2.7.6
Re: simple help -
sscarface - 28.05.2015
Quote:
Originally Posted by PeterJane
|
Thanks for replying me but loop is fine for me. The map icon is giving me errors when i add style = MAPICON_GLOBAL" So. any idea?
Re: simple help -
Infinity - 28.05.2015
The 28 is the upper limit of the loop. In this case, the loop will start at 1 and end at 28, executing the code within the brackets 28 times. This value has been chosen by someone, but has no significant meaning on it's own. It's just the number 28, picked for some reason. (This is why comments are important!)
The warning indicates that you've not entered the right (number of) arguments for the function. Look at the plugin/include its documentation to find out what it should be.
As a small footer, it would be best if you'd try and understand PAWN and programming itself before scripting. Take a look at the language guide here:
http://www.compuphase.com/pawn/Pawn_Language_Guide.pdf
Re: simple help -
PeterJane - 28.05.2015
Quote:
Originally Posted by sscarface
Thanks for replying me but loop is fine for me. The map icon is giving me errors when i add style = MAPICON_GLOBAL" So. any idea?
|
On point 2 I forgot to mention that what you need to place under OnGameModeInit is the second line, not the loop itself.
Код:
CreateDynamicMapIcon(1368.447021, -1279.782470, 13.546875, 6, -1, -1, -1, -1, 100, MAPICON_GLOBAL);
I took that line and compiled (v2.7.6) without any errors.
Make sure to update the plugin with the link I provided earlier.
Re: simple help -
sscarface - 28.05.2015
thank you so much. bro.
Re: simple help -
Vince - 28.05.2015
Quote:
Originally Posted by Infinity
|
Slight sidenote: that is the 2011 version, which includes a bunch of changes that do not apply to the version of Pawn that SA-MP uses, particularly pertaining to enums and constants. You will want to use this one from 2006:
https://code.******.com/p/pawnscript...pec=svn15&r=15
Re: simple help -
sscarface - 28.05.2015
I added this. But I don't know why my map icons disappear if i go just a little bit away. I can't them in map. I have to be so close to them any idea why?
I want to make them player can see them icons in map even if they are far.