SA-MP Forums Archive
IsPlayerVip - 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: IsPlayerVip (/showthread.php?tid=280694)



IsPlayerVip - dahley5 - 02.09.2011

Hey all! I wanted to ask if anyone knows how to make a script that makes me able to use IsPlayerVip for commands.
If possible i would like to have IsPlayerVip=>1 and IsPlayerVip=>2 and IsPlayerVip=>3.
Which means that 1 is silver, 2 is gold, and 3 is premium. I have no clue on how to do this but i want to add commands for people that donated for my server. Several people donated already and i would like to give them something in return help would be appreciated!!


Re: IsPlayerVip - Kush - 02.09.2011

PHP код:
new IsPlayerVIP[MAX_PLAYERS];
YCMD:makevip(playeridparams[], help)
{
    
#pragma unused params
    
new string[128], idlevel;
    if(
sscanf(params"ui"idlevel)) return SendClientMessage(playerid, -1"USAGE: /makevip [playerid] [level]");
    if(!
IsPlayerConnected(id)) return SendClientMessage(playerid, -1"Player is not connected!");
    
IsPlayerVIP[id] = level;
    return 
1;

Untested.


Re: IsPlayerVip - Kingunit - 02.09.2011

Do you having a save system (DINI, INI MySQL)?


Re: IsPlayerVip - Kush - 02.09.2011

Quote:
Originally Posted by Kingunit
Посмотреть сообщение
Do you having a save system (DINI, INI MySQL)?
Kingunit please, it's called Y_INI not INI. And secondly, regardless if he has it or not, a global scope could be implemented.


Re: IsPlayerVip - dahley5 - 02.09.2011

i have all includes that just got listed, i will try the one Kush said. thanks

EDIT: where do i put it?? XD


Re: IsPlayerVip - Improvement™ - 02.09.2011

Quote:
Originally Posted by dahley5
Посмотреть сообщение
EDIT: where do i put it?? XD
Where do you put what?

pawn Код:
new IsPlayerVIP[MAX_PLAYERS]; //Somewhere on top of your script

YCMD:makevip(playerid, params[], help) //under OnPlayerCommandText callback
{
    #pragma unused params
    new string[128], id, level;

    if(sscanf(params, "ui", id, level)) return SendClientMessage(playerid, -1, ""EMBED_LIGHTBLUE"USAGE: "EMBED_WHITE"/makevip [playerid] [level]");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "Player is not connected!");

    IsPlayerVIP[id] = level;
    return 1;
}
The codes displayed above, has been posted earlier by Kush.


Re: IsPlayerVip - dahley5 - 02.09.2011

EDIT: Nvm i didnt read the comments :P


Re: IsPlayerVip - dahley5 - 02.09.2011

Sorry for double post but, i got a save system, its by powerpc and the include he uses is dini.
how do i do this?
*bump*


Re: IsPlayerVip - dahley5 - 02.09.2011

Bump