26.03.2013, 09:13
Hi, im working on a ranking script and i want people to get a message when they rank up. However I don't know how to propperly use strings.
I left a lot of code out since it is not important for this question. but i get an error wich says that the array is not indexed. as you can see i indexed it to the playerid. please help
Код:
new newrank[MAX_PLAYERS];
new oldrank[MAX_PLAYERS];
if (score[playerid] >= 300){
newrank[playerid] = "***Marshall***";
}
if(oldrank[playerid] != newrank[playerid]){
format(stringb,sizeof(stringb),"~w~Rankup: ~g~%s",newrank[playerid]);
GameTextForPlayer(playerid,stringb,2000,5);
}
oldrank[playerid] = newrank[playerid];


