[HELP] How To Make Free VIP +rep
#1

SOLVED
I want to make free vip in my server
but I want to make it current player login
so when players log in, the player will automatically become a VIP member
how to make it? this my VIP variable..
PlayerInfo[playerid][VIP]
sorry for my bad english :3
Reply
#2

OnPlayerSpawn check if player login or not.You should have login variable for this.

PHP код:
public OnPlayerSpawn(playerid)
{
if(
PlayerInfo[playerid][logged] == 1)//logged is an example.Replace it with your login variable.
{
PlayerInfo[playerid][VIP] = 1;
}
return 
1;

This will make a player being VIP if they login + spawn.
If you want to make they being VIP after login just add
PHP код:
PlayerInfo[playerid][VIP] = 1
under login succes message/dialog.
Reply
#3

Quote:
Originally Posted by Sh4d0w2
Посмотреть сообщение
OnPlayerSpawn check if player login or not.You should have login variable for this.

PHP код:
public OnPlayerSpawn(playerid)
{
if(
PlayerInfo[playerid][logged] == 1)//logged is an example.Replace it with your login variable.
{
PlayerInfo[playerid][VIP] = 1;
}
return 
1;

This will make a player being VIP if they login + spawn.
If you want to make they being VIP after login just add
PHP код:
PlayerInfo[playerid][VIP] = 1
under login succes message/dialog.
thanks dude +rep
Reply
#4

then if your vip level is higher than 1 you will get an demotion instead check if player vip level already 0 by:
if(PlayerInfo[playerid][VIP] == 0) {

full code should be:

PHP код:
public OnPlayerSpawn(playerid)
{
if(
PlayerInfo[playerid][logged] == && PlayerInfo[playerid][VIP] == 0)//logged is an example.Replace it with your login variable.
{
PlayerInfo[playerid][VIP] = 1;
}
return 
1;

Reply
#5

Yeah I forget that xD
Reply
#6

Quote:
Originally Posted by jlalt
Посмотреть сообщение
then if your vip level is higher than 1 you will get an demotion instead check if player vip level already 0 by:
if(PlayerInfo[playerid][VIP] == 0) {

full code should be:

PHP код:
public OnPlayerSpawn(playerid)
{
if(
PlayerInfo[playerid][logged] == && PlayerInfo[playerid][VIP] == 0)//logged is an example.Replace it with your login variable.
{
PlayerInfo[playerid][VIP] = 1;
}
return 
1;

thanks for your comment +rep
SOLVED
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)