SA-MP Forums Archive
How to SendClientMessage when someone spawns a weapon? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to SendClientMessage when someone spawns a weapon? (/showthread.php?tid=123826)



How to SendClientMessage when someone spawns a weapon? - Nakash - 27.01.2010

I have seen this in many servers but i could not find the answer.
Thanks.


Re: How to SendClientMessage when someone spawns a weapon? - Cry_Wolf - 27.01.2010

you want to create a message when someone spawn's?
If not, please tell us exactly what do you want .


Re: How to SendClientMessage when someone spawns a weapon? - [XST]O_x - 27.01.2010

You mean like if someone spawns a weapon like Uzi he gets a message?



Re: How to SendClientMessage when someone spawns a weapon? - Nakash - 27.01.2010

Quote:
Originally Posted by Cry_Wolf
you want to create a message when someone spawn's?
If not, please tell us exactly what do you want .
No,when someone spawns a weapon.
For example cheaters when they get a weapon from their cheats,i want it to write this.

Yes,Rise..


Re: How to SendClientMessage when someone spawns a weapon? - deather - 27.01.2010

What do you mean spawn weapon?
And fr sending client message

Use :
Код:
SendClientMessage(playerid, color, "Message");



Re: How to SendClientMessage when someone spawns a weapon? - [XST]O_x - 27.01.2010

Quote:
Originally Posted by Kartowka
Quote:
Originally Posted by Cry_Wolf
you want to create a message when someone spawn's?
If not, please tell us exactly what do you want .
No,when someone spawns a weapon.
For example cheaters when they get a weapon from their cheats,i want it to write this.
Oh,you probably mean to GetPlayerWeapon.
Read that:https://sampwiki.blast.hk/wiki/GetPlayerWeapon


Re: How to SendClientMessage when someone spawns a weapon? - Nakash - 27.01.2010

I don't want the GetPlayerWeapon.
I mean if someone spawns a weapon this will write only one message like

Phil_Banks has got a Desert-Eagle.


Re: How to SendClientMessage when someone spawns a weapon? - [XST]O_x - 27.01.2010

If you want to do that you will need to use the GetPlayerWeapon function.
Like:

pawn Код:
public OnPlayerUpdate(playerid)
{
  if(GetPlayerWeapon(playerid) == weaponid(like 38,35 etc..) SendClientMessage(playerid,color,"text");
  return 1;
}



Re: How to SendClientMessage when someone spawns a weapon? - CrucixTM - 27.01.2010

Please explain, how exactly do they "spawn" a weapon? You mean buy it from Ammu-Nation? You made custom pickups for them? You made commands to get weapons?


Re: How to SendClientMessage when someone spawns a weapon? - Cry_Wolf - 27.01.2010

ahh, you mean that when someone get's a weapon, a message will be sent (to admin for ex.)?