[HELP] /makevip command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] /makevip command (
/showthread.php?tid=314194)
[HELP] /makevip command -
ttloko2 - 28.01.2012
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?
Re: [HELP] /makevip command -
Ballu Miaa - 29.01.2012
gPlayerInfo[playerid][Vip] Do you have this in your Player enum? If you have it then
Replace this
pawn Код:
new file[100];
format(file, sizeof(file), PlayerFile, gPlayerInfo[playerid][PLAYER_NAME]);
dini_IntSet(file, "Vip", 1);
With this
pawn Код:
gPlayerInfo[playerid][Vip] = 1;
Re: [HELP] /makevip command -
ttloko2 - 29.01.2012
i fixed it, thanks all