28.01.2012, 22:54
i have this command:
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?
Код:
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;
}

