Jump to content
  • 0

Problema Anti Hack


ToX1c

Question

7 answers to this question

Recommended Posts

Problema e ca daca am 100k la mine in mana si dau /givemoney numele meu si 50k ma seteaza cu 50k nu cu 150k..

if(strcmp(cmd, "/givemoney", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_WHITE, "UTILIZARE: /givemoney [playerid/PartOfName] [money]");
				return 1;
			}
			new playa;
			new money;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			money = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 4)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
			            ConsumingMoney[playa] = 1;
						SetPlayerCash(playa, money);
						GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, 128, "AdmWarning: %s has admin given %d to %s.", sendername,money,giveplayer);
						ABroadCast(COLOR_YELLOW,string,1);
						AdminLog(string);
					}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Nu ai level-ul de admin suficient pentru a folosi aceasta comanda.");
			}
		}
		return 1;
	}

Link to comment
Share on other sites

E o diferenta in scriptul asta:

GivePlayerCash - Adauga suma setata de tine la banii care deja ii ai.

SetPlayerCash - Reseteaza banii care ii aveai inainte si adauga suma introdusa de tine in schimb.

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.