Stock
#11

i suggest you to create an array for ranks like
Код:
new Rank[][16]={"r0:Newbie","r1:Crewman","r2","r3","r4 Captain"};
and then use the arrayed rank names.
why i suggest this? imagine you want to promote/demote someone, then you would need to check for each single rank string, copmpare it, then set it to another one. by using a simple number as rank, you can easily change the numerical value, and later, when needed, print the array.
Код:
format(string,sizeof(string),"%s",Rank[PlayerInfo[playerid][pRank]]);
Код:
PlayerInfo[playerid][pRank]=0;//prints "Newbie"
PlayerInfo[playerid][pRank]=1;//prints "Crewman"
so its a simple pointer to the rank array. no need to waste large strings on saving, and you can change the rank names aswell
Reply


Messages In This Thread
Stock - by emokidx - 08.08.2011, 10:22
Re: Stock - by JaTochNietDan - 08.08.2011, 10:39
Re: Stock - by emokidx - 08.08.2011, 10:40
Re: Stock - by JaTochNietDan - 08.08.2011, 10:42
Re: Stock - by emokidx - 08.08.2011, 10:43
Re: Stock - by Sascha - 08.08.2011, 10:48
Re: Stock - by emokidx - 08.08.2011, 10:49
Re: Stock - by Sascha - 08.08.2011, 10:50
Re: Stock - by JaTochNietDan - 08.08.2011, 10:50
Re: Stock - by emokidx - 08.08.2011, 10:53
Re: Stock - by Babul - 08.08.2011, 10:54
Re: Stock - by emokidx - 08.08.2011, 10:57
Re: Stock - by Babul - 08.08.2011, 11:19
Re: Stock - by emokidx - 09.08.2011, 07:07
Re: Stock - by Lorenc_ - 09.08.2011, 07:14

Forum Jump:


Users browsing this thread: 1 Guest(s)