public OnPlayerCommandPerformed( playerid, cmdtext[], success) { if(!success) { SendClientMessage(playerid,red,"ERROR: Unknown command, use /cmds for the list of available commands."); } for(new i=0; i <MAX_PLAYERS; i++) { if(pInfo[playerid][pLevel] > 1) { new string[200]; new name[MAX_PLAYER_NAME]; GetPlayerName(playerid,name,sizeof(name)); format(string,sizeof(string),"%s[%d] has used command %s",name,playerid,cmdtext); SendClientMessage(i,COLOR_GREY,string); } } return 1; }
if(pInfo[playerid][pLevel] > 1)
if(pInfo[i][pLevel] > 1)
if(pInfo[i][pLevel] > 1)
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, 0xCD0000FF, "Invalid command. Please use {FFF8CF}/cmds {CD0000}to list all available commands.");
new string[100];
format(string,sizeof(string),"%s[%d] has used command %s",pName[playerid],playerid,cmdtext);
for(new i=0;i<MAX_PLAYERS;i++) { if(pInfo[i][pLevel] > 4) SendClientMessage(i,-1,string); }
return 1;
}
pwn(2669) : error 028: invalid subscript (not an array or too many subscripts): "PlayerName" (2669) : warning 215: expression has no effect (2669) : error 001: expected token: ";", but found "]" (2669) : error 029: invalid expression, assumed zero (2669) : fatal error 107: too many error messages on one line |
format(string,sizeof(string),"%s[%d] has used command %s",PlayerName[playerid],playerid,cmdtext);
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
if(!success) return SendClientMessage(playerid, 0xCD0000FF, "Invalid command. Please use {FFF8CF}/cmds {CD0000}to list all available commands.");
new string[100], name[25];
GetPlayerName(playerid, name, 25);
format(string,sizeof(string),"%s[%d] has used command %s",name,playerid,cmdtext);
for(new i=0;i<MAX_PLAYERS;i++) { if(pInfo[i][pLevel] > 4) SendClientMessage(i,-1,string); }
return 1;
}