PHP код:
#include <a_Samp>
#include <sscanf2>
#include <zcmd>
new viplevel[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
viplevel[playerid]=0;
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
viplevel[playerid]=0;
return 1;
}
stock pname(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
return name;
}
CMD:setvip(playerid, params[])
{
new id, level, str[200];
if(sscanf(params, "ud", id, level)) return SendClientMessage(playerid, 0xFF00FF00, "USAGE: /setvip [playerid] [level]");
if(level < 0 || level > 3) return SendClientMessage(playerid, 0x000000FF, "Invalid level");
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0x0000FFFF, "That player is not connected");
if(level == 1)
{
SetPlayerScore(id, 100);
GivePlayerMoney(id, 10000);
}
if(level == 2)
{
SetPlayerScore(id, 1000);
GivePlayerMoney(id, 100000);
}
if(level == 3)
{
SetPlayerScore(id, 1000);
GivePlayerMoney(id, 100000);
}
viplevel[id] = level;
format(str, sizeof(str), "%s has gave you %d vip level", pname(playerid), level);
SendClientMessage(id, 0x0066FFFF, str);
format(str, sizeof(str), "You have gave %d vip level to %s", level, pname(id));
SendClientMessage(id, 0x0066FFFF, str);
return 1;
}
it is easy to make enjoy making and learning.
if u want to save your vip levels then youse SQLite and if your started then Dini2 or its depends on you how much you gonna learn.
I Also Make My Own VIP System I Also Add Funk VIP Cmd's My Server IP : 94.23.208.199:8002