09.10.2016, 10:23
Help me to answer this questions.
I'm confused how to get the result from multiple variable, like how to make fish system to get weight of fish.
i write this code as example:
Or anyone have other method to get the result?.
I'm confused how to get the result from multiple variable, like how to make fish system to get weight of fish.
i write this code as example:
Код:
//------- static fishgrams[MAX_PLAYERS][5]; //------ public OnPlayerConnect(playerid) { for(new i; i < 5; i++) { fishgrams[playerid][i] = random(100); } return 1; } //------ CMD:fishgrams(playerid, params[]) { //How can i get all variable value from fishgrams? //Like this? static count = 0; for(new i; i < 5; i++) { count += fishgrams[playerid][i]; } printf("You have weight %d lbs of fish.", count); return 1; }