Warning when someone gets a gun. -
Nakash - 11.03.2010
How to do when someone gets a gun it prints a message ?
I tried to do this but I faild. I mean when he gets the gun I want it to send only ONE message.
How to do this? thank u.
Re: Warning when someone gets a gun. -
aircombat - 11.03.2010
u mean if someone has a certain guy , it sends a notify to all server "name has a gun" ?
Re: Warning when someone gets a gun. -
Nakash - 12.03.2010
Quote:
Originally Posted by [AC
Etch ]
u mean if someone has a certain guy , it sends a notify to all server "name has a gun" ?
|
No.
When someone gets a gun from somewhere (for example cheats,but from admin too) it sends a clientmessagetoall.
Re: Warning when someone gets a gun. -
gotenks918 - 12.03.2010
Timers...?
Checking players weapons between ticks or something.
Re: Warning when someone gets a gun. -
Nakash - 12.03.2010
Quote:
Originally Posted by gotenks918
Timers...?
Checking players weapons between ticks or something.
|
As I said, I tried to do that and faild.
Re: Warning when someone gets a gun. -
gotenks918 - 12.03.2010
Hehe, well i'm not really a scripter so I can't help sorry
Re: Warning when someone gets a gun. -
Finn - 12.03.2010
Start using
YUP, it'll help you with this.
pawn Код:
public OnPlayerWeaponSlotChange(playerid, slot, oldweapon, newweapon)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
new string[64];
format(string, sizeof(string), "%s got weapon %d.", name, newweapon);
SendClientMessageToAll(0xFF0000FF, string);
return 1;
}
It also has many other useful callbacks;
Код:
forward OnPlayerWeaponChange(playerid, oldweapon, newweapon);
forward OnPlayerAmmoChange(playerid, oldammo, newammo);
forward OnPlayerHealthChange(playerid, Float:oldhealth, Float:newhealth);
forward OnPlayerArmourChange(playerid, Float:oldarmour, Float:newarmour);
forward OnPlayerMoneyChange(playerid, oldmoney, newmoney);
forward OnPlayerWeaponSlotChange(playerid, slot, oldweapon, newweapon);
forward OnPlayerUnpause(playerid);
forward OnPlayerPause(playerid);
forward OnPlayerExpire(playerid);
Re: Warning when someone gets a gun. -
Nakash - 12.03.2010
Thank you very much but the link is broken.
EDIT: Okay I found a mirror - Thanks!
Re: Warning when someone gets a gun. -
Torran - 12.03.2010
Quote:
Originally Posted by Uniqueee
Thank you very much but the link is broken.
|
No it isent
Re: Warning when someone gets a gun. -
Nakash - 12.03.2010
Quote:
Originally Posted by Finn
Start using YUP, it'll help you with this.
pawn Код:
public OnPlayerWeaponSlotChange(playerid, slot, oldweapon, newweapon) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, MAX_PLAYER_NAME);
new string[64]; format(string, sizeof(string), "%s got weapon %d.", name, newweapon); SendClientMessageToAll(0xFF0000FF, string);
return 1; }
It also has many other useful callbacks;
Код:
forward OnPlayerWeaponChange(playerid, oldweapon, newweapon);
forward OnPlayerAmmoChange(playerid, oldammo, newammo);
forward OnPlayerHealthChange(playerid, Float:oldhealth, Float:newhealth);
forward OnPlayerArmourChange(playerid, Float:oldarmour, Float:newarmour);
forward OnPlayerMoneyChange(playerid, oldmoney, newmoney);
forward OnPlayerWeaponSlotChange(playerid, slot, oldweapon, newweapon);
forward OnPlayerUnpause(playerid);
forward OnPlayerPause(playerid);
forward OnPlayerExpire(playerid);
|
It does not work.
I have put the include and the filterscripts in my server and everything and when I run it everything is okay, it says ****** at the start but that doesn't give a warning when someone gets a gun.
I didn't add a timer, maybe this is the problem?
I only added your code.