COMMAND:ask(playerid,params[]) { new text[128]; if(sscanf(params, "s[128]", text))SendClientMessage(playerid, 0xAA3333AA, "Usage: /ask [Text]"); SendClientMessage(playerid,0xAA3333AA,"Your question has been sent to online admins!"); new Name[MAX_PLAYER_NAME], KickMessage[128]; GetPlayerName(playerid, Name, sizeof(Name)); if(APlayerData[playerid][PlayerLevel] >= 2)format(KickMessage, sizeof(KickMessage), "[Question]:%s(%d):%s", Name, playerid,text); for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i) == 0) SendClientMessage(i,0xAA3333AA, KickMessage); } return 1; }
COMMAND:ask(playerid,params[]) { new string[128]; if(sscanf(params, "s[128]", params))return SendClientMessage(playerid, 0xAA3333AA, "Usage: /ask [Text]"); new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, sizeof(Name)); format(string, sizeof(string), "[Question]:%s(%d):%s", Name, playerid,params); for(new i = 0; i < MAX_PLAYERS; i++){ if(IsPlayerConnected(i) && APlayerData[playerid][PlayerLevel] >= 2 ) SendClientMessage(i,0xAA3333AA, string); } SendClientMessage(playerid,0xAA3333AA,"Your question has been sent to online admins!"); return 1; }
This should be works
Код:
COMMAND:ask(playerid,params[]) { new string[128]; if(sscanf(params, "s[128]", params))return SendClientMessage(playerid, 0xAA3333AA, "Usage: /ask [Text]"); new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, sizeof(Name)); format(string, sizeof(string), "[Question]:%s(%d):%s", Name, playerid,params); for(new i = 0; i < MAX_PLAYERS; i++){ if(IsPlayerConnected(i) && APlayerData[playerid][PlayerLevel] >= 2 ) SendClientMessage(i,0xAA3333AA, string); } SendClientMessage(playerid,0xAA3333AA,"Your question has been sent to online admins!"); return 1; } |