Stupid question... - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Stupid question... (
/showthread.php?tid=214997)
Stupid question... -
Outcast - 22.01.2011
I don't understand one aspect of PAWN. If I make a variable, is that variable specific for each player or everyone can use it? Hmm, I'll show on an example:
If PLAYER_1 types /getname and his name is saved in a variable "PlayerName" (name is saved in it when he connected) he will get a SendClientMessage "Your name is PLAYER_1".
now, if a PLAYER_2 types /getname, will he get his name or he will get in SendClientMessage the PLAYER_1's name?
If a global variable looks like this (above main() ):
new PlayerName[MAX_PLAYER_NAME] ;
or do I have to do:
new PlayerName[MAX_PLAYERS][MAX_PLAYER_NAME]
Please help me out, I'm confused