[pawn]#include <a_samp>
#include <zcmd>
#include <sscanf>
forward SendAdminMessage(color, string[]);
CMD:penzad(playerid, params[])
{
new giveplayerid, money;
if(sscanf(params, \"ui\", giveplayerid, money))
{
SendClientMessage(playerid, COLOR, \"Használat: /penzad [playerid][összeg]\");
return 1;
}
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR, \"Nem vagy Rcon admin!\");
GivePlayerMoney(giveplayerid, money);
SendClientMessage(playerid, COLOR, \"Pénzt adtál egy játékosnak!\");
new string[64];
format(string, sizeof(string), \"%s pénzt adott neked %d értékben!\", pName(playerid), money);
SendClientMessage(giveplayerid, COLOR, string);
return 1;
}
CMD:penzadall(playerid, params[])
{
new money;
if(sscanf(params, \"i\", money))
{
SendClientMessage(playerid, COLOR, \"Használat: /penzadall [összeg]\");
return 1;
}
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR, \"Nem vagy Rcon admin!\");
new i = 0;
while( i < MAX_PLAYERS)
{
GivePlayerMoney(i, money);
new string[64];
format(string, sizeof(string), \"%s pénzt adott neked %d értékben!\", pName(playerid), money);
SendClientMessage(i, COLOR, string);
i++;
}
SendClientMessage(playerid, COLOR, \"Pénzt adtál a játékosoknak!\");
return 1;
}
CMD:report(playerid, params[])
{
new pmsg[256];
if(sscanf(params, \"s[256]\", pmsg))
{
SendClientMessage(playerid, COLOR, \"Használat: /report [jelentés]\");
return 1;
}
SendClientMessage(playerid, COLOR, \"Üzenetedet továbítottuk az adminoknak!\");
format(pmsg, 256, \"* %s bejelentése: %s\", pName(playerid), pmsg);
SendAdminMessage(COLOR, pmsg);
return 1;
}
CMD:asay(playerid, params[])
{
new str[128];
if(sscanf(params, \"s[128]\", str)) return SendClientMessage(playerid, COLOR, \"Használat: /asay [ÜZENET]\");
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR, \"Nem vagy Rcon admin!\");
format(str, 128, \"* Rcon Admin %s: %s\", pName(playerid), str);
SendClientMessageToAll(COLOR, str);
return 1;
}
stock pName(playerid)
{
new name[24];
GetPlayerName(playerid, name, 24);
return name;
}
public SendAdminMessage(color, string[])
{
new i = 0;
while( i < MAX_PLAYERS )
{
if(IsPlayerConnected(i))
{
if(IsPlayerAdmin(i))
{
SendClientMessage(i, color, string);
i++;
}
}
}
}[/pawn]