PDA

View Full Version : Array, string, saving player name[HELP]


Neo Karls
28/07/2013, 02:57 PM
I want to make a 5 global variable in a single variable using array. Secondly I want to know how to get a player name and save it in that first array variable and so on.
For ex: I want to store name of different player in a single variable using array .

I am confused about how to use sting and array in that case. Also help me how to call that variable to print the saved player name

Scrillex
28/07/2013, 03:01 PM
You could use get player name saving it in ini if you are using it.... Something like that GetPlayerName(playerid,name,sizeof(name));

If you want it store in new ini file... But if you want all in one ini file saved... then you need just to open a ini file when you want to write it in... basically you could use a command in command you could open and save changes in ini file.....

If I got it right it will be string not array...

(Not 100% sure)

Neo Karls
28/07/2013, 03:06 PM
I don't want to save it in an ini or script files. I want that variable to get reset when player who is getting the name logged out, like
For Ex : I am an admin of my server . I want to make a cmd to save the player name in a variable (using array). When I log out , it must get reset... any possibility ?

Scrillex
28/07/2013, 03:08 PM
You mean something like set score? If so it is possible ;) Look at wiki... And you can easy make a cmd to set his score in game when he will log out it will be reset.

Neo Karls
28/07/2013, 03:12 PM
But I am trying to make an array which contain string. that's why i need help