Array, string, saving player name[HELP]
#1

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
Reply
#2

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)
Reply
#3

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 ?
Reply
#4

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.
Reply
#5

But I am trying to make an array which contain string. that's why i need help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)