[GameMode] Newport City Roleplay
#31

Command /setvip error.

When i /setvip [playerid] [level] [days]
i type example /setvip 4 1 5
And it set my day 0 and send message my vip expired

Here comand

Quote:

CMDetvip(playerid, params[]) {
new VIPID;
new level;
new time;
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
if(sscanf(params, "udd", VIPID, level, time))
return SendClientMessage(playerid, COLOR_GREY,"/setvip [playerid] [level] [days]");
if(IsPlayerConnected(VIPID))
{
if(level >= 0 && level <= 5)
{
if(time >= -1 && time <= 365)
{
new
playerName[MAX_PLAYER_NAME],
string[79];
GetPlayerName(VIPID, playerName, sizeof(playerName));
if(level == 0)
{
format(string, sizeof(string), "Administrator %s has revoked your VIP status.", PlayerInfo[playerid][pAdmin]);
SendClientMessage(VIPID, COLOR_NICESKY, string);
format(string, sizeof(string), "You have revoked %s's VIP status.", playerName);
SendClientMessage(playerid, COLOR_WHITE, string);
PlayerInfo[VIPID][pPlayerVIPExpires] = 0;
}
else if(time == -1)
{
format(string, sizeof(string), "You have made %s a permanent level %d VIP.", playerName, level);
SendClientMessage(playerid, COLOR_WHITE, string);

format(string, sizeof(string), "Administrator %s has granted you permanent VIP level %d.", PlayerInfo[playerid][pAdmin], level);
SendClientMessage(VIPID, COLOR_NICESKY, string);

PlayerInfo[VIPID][pPlayerVIPExpires] = -1;
}
else
{

format(string, sizeof(string), "You have made %s a level %d VIP, for %d days.", playerName, level, time);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "Administrator %s has granted you VIP level %d, for %d days.", PlayerInfo[playerid][pAdmin], level, time);
SendClientMessage(VIPID, COLOR_NICESKY, string);
PlayerInfo[VIPID][pPlayerVIPExpires] = gettime() + (time * 24 * 60 * 60);
}
PlayerInfo[VIPID][pVIP] = level;
}
else SendClientMessage(playerid, COLOR_GREY, "Valid times are -1 (permanent) to 365 days (one year).");
}
else SendClientMessage(playerid, COLOR_GREY, "Valid VIP levels are 0 to 5.");
}
else SendClientMessage(playerid, COLOR_GREY, "The specified player is not connected, or has not authenticated.");
}
return 1;
}

Reply


Messages In This Thread
Newport City Roleplay - by Hugo1984 - 19.07.2012, 23:20
Re: Newport City Roleplay - by sgtjones12 - 19.07.2012, 23:28
Re: Newport City Roleplay - by Kindred - 20.07.2012, 00:18
Re: Newport City Roleplay - by HyDrAtIc - 20.07.2012, 01:31
Re: Newport City Roleplay - by [GF]Logic - 20.07.2012, 02:03
Re: Newport City Roleplay - by [BK]TrollKing - 20.07.2012, 04:53
Re: Newport City Roleplay - by Koyelz - 21.07.2012, 04:05
Re: Newport City Roleplay - by Tony' - 21.07.2012, 12:18
Re: Newport City Roleplay - by ParadiseRP - 21.07.2012, 12:46
Re: Newport City Roleplay - by sidney123 - 21.07.2012, 13:31
Re: Newport City Roleplay - by Tony' - 21.07.2012, 14:01
Re: Newport City Roleplay - by Mark Shade - 21.07.2012, 16:20
Re: Newport City Roleplay - by Mark Shade - 21.07.2012, 16:28
Re: Newport City Roleplay - by ParadiseRP - 21.07.2012, 19:33
Re: Newport City Roleplay - by Tony' - 21.07.2012, 19:42
Re: Newport City Roleplay - by RedWingz - 21.07.2012, 19:51
Re: Newport City Roleplay - by megamind2067 - 21.07.2012, 20:36
Re: Newport City Roleplay - by iWind - 21.07.2012, 22:13
Re: Newport City Roleplay - by Mark Shade - 21.07.2012, 23:09
Re: Newport City Roleplay - by Nix92 - 22.07.2012, 01:00
Re: Newport City Roleplay - by SampLoverNo123 - 22.07.2012, 02:56
Re: Newport City Roleplay - by carz0159 - 22.07.2012, 04:43
Re: Newport City Roleplay - by TomerBenDori - 22.07.2012, 09:15
Re: Newport City Roleplay - by sidney123 - 22.07.2012, 12:18
Re: Newport City Roleplay - by Friend+ - 22.07.2012, 12:49
Re: Newport City Roleplay - by Mark Shade - 22.07.2012, 15:57
Re: Newport City Roleplay - by Nix92 - 22.07.2012, 17:34
Re: Newport City Roleplay - by Lorenzo! - 22.07.2012, 18:54
Re: Newport City Roleplay - by jokajoey78 - 25.07.2012, 00:14
Re: Newport City Roleplay - by Koske - 25.07.2012, 01:53
Re: Newport City Roleplay - by duongtong - 26.07.2012, 00:11
Re: Newport City Roleplay - by jokajoey78 - 26.07.2012, 06:14

Forum Jump:


Users browsing this thread: 8 Guest(s)