01.03.2010, 18:31
Is it possible to check if player has detonator (weapon id 40) with GetPlayerWeapon or in any other way?
|
Originally Posted by BlackFoX_UD_
ye it is Possible
|
if(GetPlayerWeapon(playerid) == 40)return SendClientMessage(playerid,0xFF0000FF,"The Player have a Detonater!");
if((newkeys & KEY_FIRE) && (GetPlayerState(playerid) == 1) && GetPlayerWeapon(playerid) == 40)
{
// Do Something...
}
|
Originally Posted by BlackFoX_UD_
Код:
if(GetPlayerWeapon(playerid) == 40)return SendClientMessage(playerid,0xFF0000FF,"The Player have a Detonater!"); |
if(GetPlayerWeapon(playerid) == 40)
{
new
string[128],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,MAX_PLAYER_NAME);
format(string,sizeof string,"%s That player have detonator",name);
SendClientMessageToAll(0x00FF0AFF,string);
return 1;
}
if(GetPlayerWeapon(playerid) == 40)
{
//explosion shit here
}
if(PlayerInfo[playerid][pGun12]) //<--- which is only for detonators, no other guns use this slot
{
//explosion shit here
}
if(HasDetonator[playerid])
{
//explosion shit here
}