13.02.2019, 09:51
Quote:
Код HTML:
CMD:rocketd(playerid,params[]) { (this is the line of error)new string[128];, name [MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); { format(string, 128, "{FFFFFF}%s {FFCC00}has entered the minigame of{FFFF00} [Rocket-Survive] {FFCC00}(/rocketd)", GetPlayerName(playerid)); SendClientMessageToAll(-1, string); return 1; } |
Код:
new string[128];, name [MAX_PLAYER_NAME];
Код:
// 1 new string[128], name[MAX_PLAYER_NAME+1]; // 2 new string[128]; new name[MAX_PLAYER_NAME+1]; // 3 new string[128], name[MAX_PLAYER_NAME+1]; // and probably other variances of the same thing...
Quote:
You can use a stock to return a players name, it will be alot faster than typing that out each time.
Код:
CMD:rocketd(playerid, params[]) { new string[128]; format(string, sizeof(string), {FFFFFF}%s {FFCC00}has entered the minigame of{FFFF00} [Rocket-Survive] {FFCC00}(/rocketd)", pName(playerid)); SendClientMessageToAll(-1, string); return 1; } stock pName(playerid) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME); return name; } |