Jump to content
  • 0

Cerere Ajutor Comanda /giveallmoney si /dice


fytza

Question

Nick:fytza

Problema:Comanda /giveallmoney .. da banii si dupa ii ia inapoi

Erori / warnings:-

Lini/script:-

Ai incercat sa rezolvi singur ?:da.

[pawn]CMD:giveallmoney(playerid, params[])

{

if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");

if(PlayerInfo[playerid][pAdminLevel] >= 5)

{

new moneyall,sendername[MAX_PLAYER_NAME],string[100];

GetPlayerName(playerid, sendername, sizeof(sendername));

if(sscanf(params, "i",moneyall)) return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /giveallmoney <money>");

if(moneyall >= 99999999) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}Error: Too much moneys.");

else if(moneyall < 99999999)

{

format(string, sizeof(string),"{f03337}Admin %s give %s$ to all players online.",sendername,FormatMoney(moneyall));

SendClientMessageToAll(COLOR_WHITE,string);

foreach(Player,i)

{

GivePlayerMoney(i, moneyall);

}

}

}

else

{

    SendClientMessage(playerid, COLOR_WHITE, AdminOnly);

return 1;

}

return 1;

}[/pawn]

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Incearca comanda asta :

CMD:giveallmoney(playerid, params[])
{
	new moneyall,sendername[MAX_PLAYER_NAME],string[100];
	GetPlayerName(playerid, sendername, sizeof(sendername));

	if(gPlayerLogged[playerid] == 0)
		return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");

	if(PlayerInfo[playerid][pAdminLevel] < 5)
		return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);

	if(sscanf(params, "i",moneyall))
		return SendClientMessage(playerid, 0xFFFFFFFF, "{B8DBFF}Syntax: /giveallmoney <money>");

	if(moneyall >= 99999999)
		return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}Error: Too much moneys.");

	format(string, sizeof(string),"{f03337}Admin %s give %s$ to all players online.",sendername,FormatMoney(moneyall));
	SendClientMessageToAll(COLOR_WHITE,string);

	foreach(Player,i)
	{
		GivePlayerMoney(i, moneyall);
	}

	return 1;
}

Link to comment
Share on other sites

Topic Inchis , fara reply in ultimele 48 ore.

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.