/explode command?
#6

Код:
if(strcmp(cmd, "/explode", true) == 0)
	{
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp) && PlayerInfo[playerid][pAdmin] >= 4)
		{
			SendClientMessage(playerid, COLOR_GREY, "/explode [Playerid]");
			return 1;
		}
		giveplayerid = strval(tmp);
		GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
		if(IsPlayerConnected(giveplayerid))
		{
			if(PlayerInfo[playerid][pAdmin] >= 4)
			{
			    if(IsPlayerConnected(giveplayerid))
			    {
			        new targetlevel = PlayerInfo[giveplayerid][pAdmin];
					new playerlevel = PlayerInfo[playerid][pAdmin];
					if(targetlevel > playerlevel) return SendClientMessage(playerid, COLOR_GREY, "* You can not ban People that is higher Than You!");
      				if(giveplayerid != playerid && Untouchable[giveplayerid]) return SendClientMessage(playerid, COLOR_GREY, "* You Can't Do this on This player!");
					format(string, sizeof(string), "[ADMIN]: %s has exploded %s (%d).",sendername,giveplayer,giveplayerid);
					ABroadCast(COLOR_LIGHTRED,string, 5);
					format(string, sizeof(string), "You have Successfuly Exploded %s's (%d)",giveplayer,giveplayerid);
					SendClientMessage(playerid,COLOR_LIGHTBLUE,string);
					format(string, sizeof(string), "Administrator %s Has Exploded You",sendername);
					SendClientMessage(giveplayerid, TEAM_GROVE_COLOR, string);
					new Float:boomx, Float:boomy, Float:boomz;
					GetPlayerPos(giveplayerid,boomx, boomy, boomz);
					CreateExplosion(boomx, boomy , boomz, 7, 1);
					new y, m, d;
					new h,mi,s;
					getdate(y,m,d);
					gettime(h,mi,s);
					format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s Has Exploded to %s",d,m,y,h,mi,s,sendername,giveplayer);
					ExplodeLog(string);
					if (PlayerInfo[giveplayerid][pAchievement12] == 0)
					{
					    TextDrawSetString(Textdraw64[giveplayerid],"Congratulations! ~n~~n~You have earned the medal ~n~~b~Acme Dinamyte (12) ~n~~n~~w~you won ~g~$125");
	    				ShowAchievement(giveplayerid);
						SafeGivePlayerMoney(giveplayerid,125);
						PlayerInfo[giveplayerid][pAchievement12] = 1;
					}
				}
				else
				{
				    format(string, sizeof(string), "%d is not an active player.", giveplayerid);
					SendClientMessage(playerid, COLOR_RED, string);
				}
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "You do not have permission to use that command!");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Must be logged in to use this command!");
		}
		return 1;
	}
Reply


Messages In This Thread
/explode command? - by Face9000 - 07.09.2010, 09:25
Re: /explode command? - by playbox12 - 07.09.2010, 09:33
Re: /explode command? - by iggy1 - 07.09.2010, 09:34
Re: /explode command? - by Face9000 - 07.09.2010, 09:40
Re: /explode command? - by iggy1 - 07.09.2010, 09:43
Re: /explode command? - by Sparnex - 07.09.2010, 09:45

Forum Jump:


Users browsing this thread: 1 Guest(s)