[HELP] /makevip command
#1

i have this command:
Код:
dcmd_makevip(playerid, params[])
{
    if(gPlayerInfo[playerid][PLAYER_LEVEL] < gCommands[MAKEVIP])
    {
        SendClientMessage(playerid, COLOR_RED, "You must be an Owner to use that command!");
    }
    else
    {
        new tmp[256], index, id;
        tmp = strtok(params, index);

        if(!strlen(tmp))
        {
            SendClientMessage(playerid, COLOR_ORANGE, "[MAKEVIP] Usage: /makevip [ID]");
        }
		else
		{
			id = strval(tmp);
            if(!IsPlayerConnected(id))
            {
                SendClientMessage(playerid, COLOR_ORANGE, "[MAKEVIP] That player is not connected.");
            }
            else
            {
				new owner[MAX_PLAYER_NAME];
				new string[128];
                GetPlayerName(playerid, owner, sizeof(owner));
                format(string, sizeof(string), "You got ~p~VIP ~w~from Owner: ~r~%s", owner);
				SendClientMessage(id, COLOR_LIGHTBLUE,string);
                new file[100];
                format(file, sizeof(file), PlayerFile, gPlayerInfo[playerid][PLAYER_NAME]);
                dini_IntSet(file, "Vip", 1);
                
            }
        }
    }
    return 1;
}
i tried to put value vip=1 inside admin/users/Player.ini folder soo it can store if player is or not vip, but i didnt work, you guys have any idea?
Reply


Messages In This Thread
[HELP] /makevip command - by ttloko2 - 28.01.2012, 22:54
Re: [HELP] /makevip command - by Ballu Miaa - 29.01.2012, 01:54
Re: [HELP] /makevip command - by ttloko2 - 29.01.2012, 03:40

Forum Jump:


Users browsing this thread: 1 Guest(s)