[AJUDA] +REP
#4

Prestou vlw agora me ajuda aqui ne outro probleminha, eu queria bloquear esse comando, para so VIP poder usar

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[128], tmp[128], idx, glasseid, skin, id;
    cmd = strtok(cmdtext, idx);

    if(!strcmp("/oculos",cmd,true))
    {
        tmp = strtok(cmdtext, idx);
        skin = GetPlayerSkin(playerid);
        id = strval(tmp);
        if(!id || id > 33) return SendClientMessage(playerid, 0xFFFFFFAA, "{ff6633}/oculos [1 - 33]");
        TextDrawShowForPlayer(playerid, MsgBox);
        SetTimerEx("Hide", 3500, false, "d", playerid);

        if(id > 30) goto PutPoliceGlasses;
        else
        {
            id--;
            glasseid =  CommonRed + id;
            SetPlayerHoldingObject(playerid, glasseid, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5]);
            return 1;
        }

        PutPoliceGlasses:

        glasseid = CopGlassesBlack + (id - 31);
        SetPlayerHoldingObject(playerid, glasseid, 2, SkinOffSet[skin][0], floatadd(SkinOffSet[skin][1], 0.004500), SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5]);
        return 1;
    }
Variavel
pawn Код:
new vip[MAX_PLAYERS];
Exemplo
pawn Код:
if(strcmp(cmdtext, "/comandosvip", true) == 0)
{
    if(vip[playerid] == 0) return SendClientMessage(playerid, GREEN, "Vocк nгo й Vip!");
    SendClientMessage(playerid,  VERDE, "Lista de Comandos:");
    SendClientMessage(playerid,  AMARELO, "/animes /jetpack /minigun /bazuka /recuperar /repararp [ID] /virar");
    SendClientMessage(playerid,  AMARELO, "/cnn [Texto] /ann [Texto] /tunar /neon /gangcriar");
    return true;
}
Reply


Messages In This Thread
[AJUDA] +REP - by peumenezes - 27.04.2012, 00:46
Re: [AJUDA] +REP - by dPlaYer_ - 27.04.2012, 00:56
Re: [AJUDA] +REP - by ViniBorn - 27.04.2012, 00:56
Re: [AJUDA] +REP - by peumenezes - 27.04.2012, 01:07
Re: [AJUDA] +REP - by Caio_Freeze - 27.04.2012, 01:09
Re: [AJUDA] +REP - by .FuneraL. - 27.04.2012, 01:09
Re: [AJUDA] +REP - by peumenezes - 27.04.2012, 01:25
Re: [AJUDA] +REP - by Caio_Freeze - 27.04.2012, 01:28
Re: [AJUDA] +REP - by peumenezes - 27.04.2012, 01:32
Re: [AJUDA] +REP - by Caio_Freeze - 27.04.2012, 01:37

Forum Jump:


Users browsing this thread: 2 Guest(s)