Save SetArmourPlayer
#1

Use this code to give the armor to users, but I would have armor on him and if the user exits and falls within the server the armor stays with him, 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;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)