31.07.2012, 17:45
Hey People,
Do any of you know which VIP System works with Ravens Roleplay?
STRCMP
Thanks
Do any of you know which VIP System works with Ravens Roleplay?
STRCMP
Thanks
I just want a VIP System that works, not another whole admin system
|
#define FILTERSCRIPT
//Credits to samp
#include <a_samp>
//Credits to Zeex for zcmd
#include <zcmd>
//Credits to ****** for foreach
#include <foreach>
//Credits to ****** for sscanf
#include <sscanf2>
#include <dini>
//Credits to me folor colors
#include <Colors>
#define MAX_VIP 3
#define PlayerFile "Vip/%s.ini"
#pragma tabsize 0
enum dData
{
Vip
}
new PlayerInfo[MAX_PLAYERS][dData];
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Vip system loaded!");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
new file[256], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(file,sizeof(file),PlayerFile,name);
if(!dini_Exists(file) )
{
dini_Create(file);
dini_Set(file,"Name",name);
dini_IntSet(file,"Vip",0);
PlayerInfo[playerid][Vip] = 0;
SendClientMessage(playerid,COLOR_RED,"Your vip level is 0; !");
}
else
{
PlayerInfo[playerid][Vip] = dini_Int(file,"Vip");
new string[256];
format(string,sizeof(string),"Your vip level is %d",PlayerInfo[playerid][Vip]);
SendClientMessage(playerid,COLOR_GREEN,string);
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new file[256], name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(file,sizeof(file),PlayerFile,name);
if(dini_Exists(file) )
{
dini_IntSet(file,"Vip",PlayerInfo[playerid][Vip]);
}
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
if(text[0] == '!' )
{
if(PlayerInfo[playerid][Vip] > 0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
new string[256];
format(string,sizeof(string),"Vip -- %s ( rank: %d): %s",name,PlayerInfo[playerid][Vip],text[0]);
MessageToVips(COLOR_GREEN,string);
return 0;
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 0;
}
CMD:setvip(playerid,params[])
{
new id, level;
if(sscanf(params,"ud",id,level) ) return SendClientMessage(playerid,COLOR_RED,"USUAGE: /setvip [id][ level]");
if(!IsPlayerAdmin(playerid) ) return SendClientMessage(playerid,COLOR_RED,"You are not an admin!");
if(level > MAX_VIP) return SendClientMessage(playerid,COLOR_RED,"Invalid Level");
if(!IsPlayerConnected(id) ) return SendClientMessage(playerid,COLOR_RED,"Player is not connected");
else
{
new name[MAX_PLAYER_NAME], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
GetPlayerName(id,playername,sizeof(playername));
new fstring[256], zstring[256];
format(fstring,sizeof(fstring),"Administrator %s maked you V.I.P level %d",name,level);
format(zstring,sizeof(zstring),"You maked %s level %d",playername,level);
SendClientMessage(playerid,COLOR_RED,zstring);
SendClientMessage(id,COLOR_RED,fstring);
PlayerInfo[id][Vip] = level;
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
//mesage to vips
stock MessageToVips(color, const string[])
{
foreach(Player,i)
{
if(IsPlayerConnected(i) == 1)
if(PlayerInfo[i][Vip] >= 1)
SendClientMessage(i,color,string);
}
}
he want to search a VIP Syst , with are compatible with Razven Roleplay
hey..here i want to say you try create your own and making it in your GameMode because all VIP's system from from Majed's site was created on another functions and enum , try create your own some enum this is what i created as VIp system but i was to borred to finish it so... pawn Код:
|