SA-MP Forums Archive
[HELP] How To Make Free VIP +rep - 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] How To Make Free VIP +rep (/showthread.php?tid=594268)



[HELP] How To Make Free VIP [SOLVED] - TitanZ - 15.11.2015

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


Re: [HELP] How To Make Free VIP +rep - Sh4d0w2 - 15.11.2015

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.


Re: [HELP] How To Make Free VIP +rep - TitanZ - 15.11.2015

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


Re: [HELP] How To Make Free VIP +rep - jlalt - 15.11.2015

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;




Re: [HELP] How To Make Free VIP +rep - Sh4d0w2 - 15.11.2015

Yeah I forget that xD


Re: [HELP] How To Make Free VIP +rep - TitanZ - 15.11.2015

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