Help Server Money
#6

Here is the admin /setmoney command

Код:
	if(strcmp(cmd, "/setmoney", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			tmp = strtok(cmdtext, idx);
			if(!strlen(tmp))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "Koristi: /setmoney [ID na Igrac/Del od Imeto] [novac]");
				return 1;
			}
			new playa;
			new money;
			playa = ReturnUser(tmp);
			tmp = strtok(cmdtext, idx);
			money = strval(tmp);
			if (PlayerInfo[playerid][pAdmin] >= 1337)
			{
			    if(IsPlayerConnected(playa))
			    {
			        if(playa != INVALID_PLAYER_ID)
			        {
						SafeResetPlayerMoney(playa);
						SafeGivePlayerMoney(playa, money);
						GetPlayerName(playa, giveplayer, sizeof(giveplayer));
						GetPlayerName(playerid, sendername, sizeof(sendername));
						format(string, 256, "|DL|%s mu gi podesi parite na %s na $%d.", sendername,giveplayer,money);
						SendAdminMessage(WHITE,string);
						SaveAccounts();
						OnPropUpdate();
						}
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD1, "Ne ste ovlasteni za taa Komanda!");
			}
		}
		return 1;
	}
Reply


Messages In This Thread
Help Server Money - by Dark Crow - 13.05.2012, 20:55
Re: Help Server Money - by ViniBorn - 13.05.2012, 20:58
Re: Help Server Money - by Yuryfury - 13.05.2012, 20:59
Re: Help Server Money - by Dark Crow - 13.05.2012, 21:06
Re: Help Server Money - by ViniBorn - 13.05.2012, 21:10
Re: Help Server Money - by Dark Crow - 13.05.2012, 21:15
Re: Help Server Money - by ViniBorn - 13.05.2012, 21:25
Re: Help Server Money - by Dark Crow - 13.05.2012, 21:28
Re: Help Server Money - by Yuryfury - 13.05.2012, 21:43
Re: Help Server Money - by Dark Crow - 13.05.2012, 21:51

Forum Jump:


Users browsing this thread: 3 Guest(s)