20/02/2022 10:51
Hello, everyone. I decided to make simple commands(DC_CMD/Pawn.CMD) for equipment SWAT. With the help of these commands, a helmet, body armor and a shield will be added to your character's hand. For all skins
Public OnPlayerConnect
to Commands
Thanks for attention
Código:
#define ARMOUR_INDEX 4
#define ADMIN_SWAT 7
#define ADMIN_HELMETSW 8
#define ADMIN_ARMOUR 3
#define BRONIK_TERM 2
Código:
_DSWAT(playerid);
Código:
stock _SWAT(playerid)
{
SetPlayerAttachedObject(playerid, ADMIN_SWAT, 18637, 14, 0.0, 0.0, 0.0, 0.0, 180.0, 180.0);
SetPlayerAttachedObject(playerid, ADMIN_ARMOUR , 19142, 1,0.08,0.04,0.00,0.0,0.0,-7.4);
SetPlayerAttachedObject(playerid, ADMIN_HELMETSW,19141,2,0.122000,-0.008000,0.0,0.0,0.0,0.0,1.0,1.0,1.0);
return 1;
}
stock _DSWAT(playerid)
{
RemovePlayerAttachedObject(playerid, ADMIN_ARMOUR);
RemovePlayerAttachedObject(playerid, ADMIN_SWAT);
RemovePlayerAttachedObject(playerid, ADMIN_HELMETSW);
return 1;
}
CMD:swat(playerid, params[])
{
// your check for admin or policeman
if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, -1, "Used /swat [id player]");
_SWAT(params[0]);
return 1;
}
CMD:delswat(playerid, params[])
{
// your check for admin or policeman
if(sscanf(params, "u", params[0])) return SendClientMessage(playerid, -1, "Used /delswat [id player]");
_DSWAT(params[0]);
return 1;
}