BUG /moneyall
#1

Salut , deci dau moneyall si suma le da banii apoi le ia ,,,



Code:
	   if(strcmp(cmd, "/moneyforall", true) == 0)
	{
	    GetPlayerName(playerid, sendername, sizeof(sendername));
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdminServer] >= 7)
		{
			SendClientMessage(playerid, COLOR_DBLUE, "Correct {B8DBFF}Synthax: /moenyforall <Amount>");
			return 1;
		}
	    new money;
		money = strval(tmp);

	    if(IsPlayerConnected(playerid))
		{
			if(PlayerInfo[playerid][pAdminServer] >= 7)
			{
			    if ( money >= 99999999)
			    {
			    SendClientMessage(playerid, COLOR_RED, "ERROR : Too much moneys!");
			    } else if ( money < 99999999)
			    {
			    format(string, 256, "All players recieved $%s from %s" ,tmp,sendername);
				BroadCast(COLOR_LIGHTRED,string);
				for(new i=0; i < MAX_PLAYERS; i++)
			    {
				GivePlayerMoney(i, money);
				}
				}
			}
			else
			{
	            SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
	 			return 1;
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)