#include <a_samp> #include <core> #include <float> #define COLOR_GREEN 0x33AA33AA public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/eq", true)) { new Float:var0 = 0.0; GetPlayerArmour(playerid, var0); if(var0 > 0) { return SendClientMessage(playerid, 0xFDE39DAA, "Vocк Ja Esta Equipado!."); } if(GetPlayerSkin(playerid) > 279 && GetPlayerSkin(playerid) < 289) { if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1); SetPlayerAttachedObject(playerid, 1, 18637, 4, 0.3, 0, 0, 0, 170, 270, 1, 1, 1); SetPlayerAttachedObject(playerid, 2,18641, 5, 0.1, 0.02, -0.05, 0, 0, 0, 1, 1, 1); } else { SendClientMessage(playerid, 0x33AA33AA, "Equipamento colocado."); } return 1; } return 0; }
if(GetPlayerSkin(playerid) > 279 && GetPlayerSkin(playerid) < 289)
{
if(IsPlayerAttachedObjectSlotUsed(playerid,1)) RemovePlayerAttachedObject(playerid,1);
// ?? junto com a outra funзao???
SetPlayerAttachedObject(playerid, 1, 18637, 4, 0.3, 0, 0, 0, 170, 270, 1, 1, 1);
SetPlayerAttachedObject(playerid, 2,18641, 5, 0.1, 0.02, -0.05, 0, 0, 0, 1, 1, 1);
}
else
{
SendClientMessage(playerid, 0x33AA33AA, "Equipamento colocado.");
}
#include <a_samp> #include <core> #include <float> public OnPlayerCommandText(playerid, cmdtext[]) { if(!strcmp(cmdtext, "/escudo", true)) { new Float:var0 = 0; GetPlayerArmour(playerid, var0); if(var0 > 0) { return SendClientMessage(playerid, 0xFDE39DAA, "Vocк ja equipou."); } if(GetPlayerSkin(playerid) > 279 && GetPlayerSkin(playerid) < 289) { SetPlayerAttachedObject(playerid,1,19142,1,0.1,0.0 5,0.0,0.0,0.0,0.0); SetPlayerAttachedObject(playerid,2,19141,2,0.11,0. 0,0.0,0.0,0.0,0.0); SetPlayerAttachedObject(playerid,3, 18637, 4, 0.3, 0, 0, 0, 170, 270, 1, 1, 1); SetPlayerAttachedObject(playerid,4,18642,7,0.1,0.0 ,-0.11,0.0,-90.0,90.0); SetPlayerAttachedObject(playerid,5,18641, 5, 0.1, 0.02, -0.05, 0, 0, 0, 1, 1, 1); GivePlayerWeapon(playerid, 3, 1); SetPlayerArmour(playerid, playerid); SendClientMessage(playerid, 0xFDE39DAA, "Equipamentos colocado!"); } else { SendClientMessage(playerid, 0xFDE39DAA, "Vocк nao й policial."); } return 1; } return 0; } public OnPlayerUpdate(playerid) { new Float:var0 = 0; GetPlayerArmour(playerid, var0); if(var0 < 1) { RemovePlayerAttachedObject(playerid, 1); } return 1; } public OnFilterScriptExit() { for(new var0 = 0; var0 < 500; var0++) { RemovePlayerAttachedObject(var0, 1); RemovePlayerAttachedObject(var0, 2); RemovePlayerAttachedObject(var0, 3); RemovePlayerAttachedObject(var0, 4); RemovePlayerAttachedObject(var0, 5); } return 1; } |
Ja resolvi, ficou assim:
Sу preciso saber como faзo para deixar o colete full? |
SetPlayerArmour(playerid, 100);
SetPlayerHealth(playerid, 100);