How to make a ..
#2

Copied from ladmin
Код:
	if(strcmp(cmd, "/slap", true) == 0)	{
	if(PlayerInfo[playerid][Level] >= 2) {
	    new tmp[256];
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))	{
		SendClientMessage(playerid, red, "USAGE: /slap [playerid] [reason]");
		return 1;	}
		new player1;
		player1 = strval(tmp);
		if(!IsPlayerConnected(player1) || player1 == INVALID_PLAYER_ID || (PlayerInfo[player1][Level] == ServerInfo[MaxAdminLevel]) )	{
		SendClientMessage(playerid,red,"ERROR: Player is not connected or is yourself");
		return 1;	}
		tmp = strtok(cmdtext, idx);

		GetPlayerName(player1, playername, sizeof(playername));		GetPlayerName(playerid, adminname, sizeof(adminname));
		format(string,256,"You have been slapped by Administrator %s %s ",adminname,cmdtext[7]);	SendClientMessage(player1,red,string);
		format(string,256,"You have slapped %s %s ",playername,cmdtext[7]);	SendClientMessage(playerid,blue,string);
        new Float:Health, Float:x, Float:y, Float:z; GetPlayerHealth(player1,Health); SetPlayerHealth(player1,Health-25); GetPlayerPos(player1,x,y,z);	SetPlayerPos(player1,x,y,z+5); PlayerPlaySound(playerid,1190,0.0,0.0,0.0); PlayerPlaySound(player1,1190,0.0,0.0,0.0);
	} else	{
  	SendClientMessage(playerid,red,"ERROR: You need to be level 2 to use this command");   }
	return 1;	}
You mean /giveweapon [playerid] [weaponid] [ammo ammount] for admins?
Or that player who holds the weapon want to give other player his weapon for the ammount of ammo he wants.
Reply


Messages In This Thread
How to make a .. - by Matej_ - 18.09.2010, 07:04
Re: How to make a .. - by nejc001 - 18.09.2010, 07:11
Re: How to make a .. - by Kyosaur - 18.09.2010, 07:13
Re: How to make a .. - by Matej_ - 18.09.2010, 08:35
Re: How to make a .. - by Seven. - 18.09.2010, 08:38
Re: How to make a .. - by Dime - 18.09.2010, 08:43
Re: How to make a .. - by Matej_ - 18.09.2010, 09:09
Re: How to make a .. - by Matej_ - 18.09.2010, 09:29
Re: How to make a .. - by Dime - 18.09.2010, 09:35
Re: How to make a .. - by Matej_ - 18.09.2010, 09:37

Forum Jump:


Users browsing this thread: 2 Guest(s)