Quote:
Originally Posted by [M]onsieur
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/nextmode", true, 9) && IsPlayerAdmin(playerid)) { if(strlen(cmdtext) < 9) { return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /nextmode [name]"); }
static string[128] ;
format(string, sizeof(string), "changemode %s", str, cmdtext[10]);
return SendRconCommand(string), true; } return false; }
|
Why did you use a static? It's not exactly good here... As far as I know, statics are meant to be used outside the function, unlike new. So basically if he has "string" somewhere else, it will shadow a variable and return a warning.