24.01.2014, 09:45
I would like that when a user leaves the server the user who has the armor on him not lost, use this script as filterscript to give armor users, but if you're entering the server lose the armor, please help me!
Код HTML:
#define FILTERSCRIPT
#include <a_samp>
#define COLOR_SLATEGRAY 0x708090FF
#define COLOR_LIMEGREEN 0x32CD32FF
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/setarmatura", cmdtext, false, 12) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "Non sei autorizzato a usare questo comando");
else if((cmdtext[12] != ' ') || (cmdtext[13] == ' ') || (cmdtext[13] == '\0'))
return SendClientMessage(playerid, 0xFF0000AA, "Usa: /setarmatura [playerid]");
new
targetid = strval(cmdtext[13]);
if(!IsPlayerConnected(targetid))
return SendClientMessage(playerid, 0xFF0000AA, "PlayerID non trovato");
SetPlayerArmour(targetid, 100.0);
SendClientMessage(playerid, COLOR_LIMEGREEN, "Armatura settata");
return 1;
}
return 0;
}