help cmd
#1

Is it possible to change this command from only level to the player who uses it? from only one level no more example lvl 6and eliminate what else does not work give level to the player who uses it

CMDetvip(playerid,params[]) {
if(PlayerInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,red,"You cannot do it in jail!"); delete
if(PlayerInfo[playerid][LoggedIn] == 1) {
if(PlayerInfo[playerid][Level] >= 6) {
new tmp[128], tmp2[128], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(isnull(params)) return SendClientMessage(playerid, red, "USAGE: /setvip [playerid] [level]");delete
new player1, level, playername[MAX_PLAYER_NAME], adminname[MAX_PLAYER_NAME], string[128];
player1 = strval(tmp);
if(isnull(tmp2)) return SendClientMessage(playerid, red, "USAGE: /setvip [playerid] [level]");delete !!
level = strval(tmp2);

if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID) {
if(PlayerInfo[player1][LoggedIn] == 1) {
if(level > 6 ) return SendClientMessage(playerid,red,"ERROR: Incorrect Level");
if(level == PlayerInfo[player1][vip]) return SendClientMessage(playerid,red,"ERROR: Player is already this level");
GetPlayerName(player1, playername, sizeof(playername)); GetPlayerName(playerid, adminname, sizeof(adminname));
new year,month,day; getdate(year, month, day); new hour,minute,second; gettime(hour,minute,second);

if(level > 0) format(string,sizeof(string),"Administrator %s has set you to VIP Status [level %d]",adminname, level);
else format(string,sizeof(string),"Administrator %s has set you to Player Status [level %d]",adminname, level);
SendClientMessage(player1,blue,string);

if(level > PlayerInfo[player1][vip]) GameTextForPlayer(player1,"VIP[]Promoted", 2000, 3);
else GameTextForPlayer(player1,"VIP[]Demoted", 2000, 3);

format(string,sizeof(string),"You have made %s VIP Level %d on %d/%d/%d at %d:%d:%d", playername, level, day, month, year, hour, minute, second); SendClientMessage(playerid,blue,string);
format(string,sizeof(string),"Administrator %s has made %s VIP Level %d on %d/%d/%d at %d:%d:%d",adminname, playername, level, day, month, year, hour, minute, second);
dUserSetINT(PlayerName2(player1)).("vip",(level)); save levels !!!!!! important
PlayerInfo[player1][vip] = level;
return PlayerPlaySound(player1,1057,0.0,0.0,0.0);
} else return SendClientMessage(playerid,red,"ERROR: Player must be registered and logged in to be admin");
} else return SendClientMessage(playerid, red, "Player is not connected");
} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
} else return SendClientMessage(playerid,red,"ERROR: You must be logged in to use this commands");
}
*/
Reply
#2

pawn Код:
CMD:makemevip(playerid, params[])
{
    if(PlayerInfo[playerid][LoggedIn] == 0) return SendClientMessage(playerid, red, "ERROR: You must be logged in to use this commands");
    new level = 1; //change this if u want. 1 = level 1 etc
    if(PlayerInfo[playerid][vip] >= level) return SendClientMessage(playerid, red, "ERROR: You are already VIP.");
    GameTextForPlayer(playerid, "VIP[]Promoted", 2000, 3);
    dUserSetINT(PlayerName2(playerid)).("vip",(level));
    PlayerInfo[playerid][vip] = level;
    PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, -1, "Congratulations! You are now VIP!");
    return 1;
}
Reply
#3

Quote:
Originally Posted by ReD_HunTeR
Посмотреть сообщение
pawn Код:
CMD:makemevip(playerid, params[])
{
    if(PlayerInfo[playerid][LoggedIn] == 0) return SendClientMessage(playerid, red, "ERROR: You must be logged in to use this commands");
    new level = 1; //change this if u want. 1 = level 1 etc
    if(PlayerInfo[playerid][vip] >= level) return SendClientMessage(playerid, red, "ERROR: You are already VIP.");
    GameTextForPlayer(playerid, "VIP[]Promoted", 2000, 3);
    dUserSetINT(PlayerName2(playerid)).("vip",(level));
    PlayerInfo[playerid][vip] = level;
    PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
    SendClientMessage(playerid, -1, "Congratulations! You are now VIP!");
    return 1;
}
thanks bro !!!!!!!!!!!!!you're the best !!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)