forward BlockWeaponMSG(playerid);
#define SystemMSG 99
new msg[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
msg[playerid] = 0;
return 1;
}
public OnPlayerUpdate (playerid)
{
new strcmd [9];
if( GetPlayerAmmo(playerid) == 2)
{
if(msg[playerid] == 0)
{
strcat(strcmd, "no ammo", sizeof(strcmd));
ShowPlayerDialog(playerid, SystemMSG, DIALOG_STYLE_MSGBOX, "System", strcmd, "Exit", "");
msg[playerid] = 1;
SetTimer("BlockWeaponMSG", 3000, false);
}
}
return 1;
}
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
new strcmd [9];
if( GetPlayerAmmo(playerid) == 3)
{
strcat(strcmd, "no ammo", sizeof(strcmd));
ShowPlayerDialog(playerid, SystemMSG, DIALOG_STYLE_MSGBOX, "System", strcmd, "Exit", "");
}
if( GetPlayerAmmo(playerid) == 2)
{
strcat(strcmd, "no ammo", sizeof(strcmd));
ShowPlayerDialog(playerid, SystemMSG, DIALOG_STYLE_MSGBOX, "System", strcmd, "Exit", "");
}
return 1;
}
public BlockWeaponMSG(playerid)
{
msg[playerid] = 0;
return 1;
}
#define SystemMSG 99
new msg[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
msg[playerid] = 0;
return 1;
}
public OnPlayerUpdate (playerid)
{
new strcmd [9];
if( GetPlayerAmmo(playerid) == 2)
{
if(msg[playerid] == 0)
{
strcat(strcmd, "no ammo", sizeof(strcmd));
ShowPlayerDialog(playerid, SystemMSG, DIALOG_STYLE_MSGBOX, "System", strcmd, "Exit", "");
msg[playerid] = 1;
SetTimer("BlockWeaponMSG", 3000, false);
}
}
return 1;
}
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
new strcmd [9];
if( GetPlayerAmmo(playerid) == 3)
{
strcat(strcmd, "no ammo", sizeof(strcmd));
ShowPlayerDialog(playerid, SystemMSG, DIALOG_STYLE_MSGBOX, "System", strcmd, "Exit", "");
}
if( GetPlayerAmmo(playerid) == 2)
{
strcat(strcmd, "no ammo", sizeof(strcmd));
ShowPlayerDialog(playerid, SystemMSG, DIALOG_STYLE_MSGBOX, "System", strcmd, "Exit", "");
}
return 1;
}
public BlockWeaponMSG(playerid)
{
msg[playerid] = 0;
return 1;
}