/Dropweapon Command
#6

Код:
if (strcmp("/dropgun", cmdtext, true, 10) == 0)
{
if(GetPlayerWeapon(playerid) == 0) return SendClientMessage(playerid,0xFF0000FF,"You haven't gun in Your hand.");
new name[MAX_PLAYER_NAME],msg[128],Float:x,Float:y,Float:z;
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
GetPlayerPos(playerid,x,y,z);
new WhatGun = GetPlayerWeapon(playerid);
new HowMuch = GetPlayerAmmo(playerid);
GivePlayerWeapon(playerid,WhatGun,-HowMuch);
format(msg,128,"%s has dropped his/her weapon on the floor.",name);
for(new i=0;i<MAX_PLAYERS;i++){
if(IsPlayerConnected(playerid)){
if(IsPlayerInRangeOfPoint(i,15,x,y,z)){
SendClientMessage(i,0xC2A2DAAA,msg);
}
}
}
return 1;
}
put that under
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
Reply


Messages In This Thread
/Dropweapon Command - by Platanito - 25.02.2010, 18:31
Re: /Dropweapon Command - by Martin_M - 25.02.2010, 18:44
Re: /Dropweapon Command - by Platanito - 25.02.2010, 18:55
Re: /Dropweapon Command - by Martin_M - 25.02.2010, 19:14
Re: /Dropweapon Command - by Platanito - 25.02.2010, 19:19
Re: /Dropweapon Command - by Chrham_2 - 25.02.2010, 19:22
Re: /Dropweapon Command - by Platanito - 25.02.2010, 19:30
Re: /Dropweapon Command - by Chrham_2 - 25.02.2010, 19:32

Forum Jump:


Users browsing this thread: 1 Guest(s)