#1

pawn Код:
#include <a_samp>
#include <zcmd>
#include <sscanf>

enum vInfo
{
    Vip
}
new Vips[MAX_PLAYERS][vInfo];

//==========================/VIP================================================

CMD:setvip(playerid, params[])
{
    new ID, Level, string[128], name[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
    if(sscanf(params,"ui", ID, Level)) return SendClientMessage(playerid, -1, "{FF0000}Folosire: {FFFFFF}/SetVip [ID] [Nivel]");
    if(IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul nu este conectat.");
    if(Level > 3) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Nivel invalid. [1-3]");
    if(Vips[ID][Vip] == Level) return SendClientMessage(playerid, -1, "{FF0000}EROARE: {FFFFFF}Jucătorul are deja nivelul acela de {FF0000}VIP {FFFFFF}.");
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(ID, pname, sizeof(pname));
    format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}Ai fost făcut de către {FF0000}%s {FFFFFF}nivel: {FF0000}%i {FFFFFF}de VIP.", name, Level);
    SendClientMessage(ID, -1, string);
    format(string, sizeof(string), "{FF0000}[INFO]: {FFFFFF}L-ai făcut pe {FF0000}%s {FFFFFF}nivel: {FF0000}%i {FFFFFF}de VIP.", pname, Level);
    SendClientMessage(playerid, -1, string);
    Vips[ID][Vip] = Level;
    return 1;
}
No errors when I compile, but when I enter In-Game, I type /SetVip, it shows me correct usage, but then says: "Unknown Command", there's something wrong in script?
Reply


Messages In This Thread
Vip. - by HY - 17.12.2014, 14:32
Re: Vip. - by ViperAssasin11 - 17.12.2014, 14:41
Re: Vip. - by HY - 17.12.2014, 14:46
AW: Re: Vip. - by Flori - 17.12.2014, 14:48
Re: Vip. - by Ox1gEN - 17.12.2014, 14:52
Re: Vip. - by HY - 17.12.2014, 14:52

Forum Jump:


Users browsing this thread: 1 Guest(s)