IsPlayerVip
#1

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!!
Reply
#2

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.
Reply
#3

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

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.
Reply
#5

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

EDIT: where do i put it?? XD
Reply
#6

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.
Reply
#7

EDIT: Nvm i didnt read the comments :P
Reply
#8

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*
Reply
#9

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)