Can someone help. [HELP]
#1

I've tried downloading V.I.P scripts, and I feel better if I could create my own. There is only one How to create VIP Script, and I followed it. In that tutorial, made by tanush, it has Zcmd. I want a normal strcmp code way. Can someone show me how to create a VIP system. Must log in to rcon admin and then /makevip, and there are only 3 levels to set. And then, just show me how to create a command. I also want a saving system. I want something like, it will save it at scriptfiles in a .txt note form. Can someone please help me. I'll give +REP!
Reply
#2

Why would you want to use strcmp if zcmd is faster?
Reply
#3

To be honest, this is a filterscript. I want to change it to strcmp, so its easy to be added in gamemode. Another thing is, its easy to have it in strcmp. I'm a basic scripter, and I know how to use strcmp well. Not ZCMD.
Reply
#4

honestly but if you use strcmp you will convert sscanf to strtok?

pawn Код:
if (strcmp("/makevip", cmdtext, true, 10) == 0)
{
    new str[128], Nam[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME], File:VIPLog;
    if(!IsPlayerAdmin(playerid)) return 0;//This will make the command work for rcon, if your not rcon it will do SERVER: Unknown Command
    if(sscanf(params,"ui",ID,vlevel)) return SendClientMessage(playerid,0xFF9900AA, "USAGE: /makevip [playerid / partofname] [Level 1-3]");//If you do not use the format /setvip properly it will show how to
    if(ID == INVALID_PLAYER_ID) return SendClientMessage(playerid,0xFF0000FF, "That user is not connected.");//if its an unknown ID, it will show that person is not connected
    if(vlevel > 3) return SendClientMessage(playerid,0xFF0000FF,"AVAILABLE VIP LEVELS 1-3!"); //If you add a number over 3 for /setvip, ex: /setvip Tanush 1000, it will show that message
    if(vlevel == 0)//if you select vip level 0
    {
        if(PlayerData[ID][vip] == 0) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 0 vip!");// If the person you attempt to /setvip that is already level 0 vip, it will show that
        GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//Defines the playerid name
        GetPlayerName(ID,pname,MAX_PLAYER_NAME);//Defines the other player name
        format(str, sizeof(str),"%s has set your VIP Level to 0!",Nam);//string
        SendClientMessage(ID,0xFF9900AA,str);//It will send the other person a message that %s has set your vip level to 0
        format(str,sizeof(str),"You had set %s VIP Level to 0!",pname);//string
        SendClientMessage(playerid,0xFF9900AA,str);//This will send you that you had set %s vip level to 0
        PlayerData[ID][vip] = 0;//Sets the other person vip level to 0
        format(str, sizeof(str), "%s has set %s's VIP Level to 0\r\n", Nam, pname);
        VIPLog = fopen("VIPLog.txt", io_append);
        fopen(VIPLog, str);
        fclose(VIPLog);
    }
    if(vlevel == 1)//if you select vip level 1
    {
        if(PlayerData[ID][vip] == 1) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 1 vip!");//If the person you attempt to /setvip that is already level 1 vip, it will show that
        GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//defines the playerid name
        GetPlayerName(ID,pname,MAX_PLAYER_NAME);//defines the other player name
        format(str, sizeof(str),"%s has set your VIP Level to 1 (BRONZE VIP)!",Nam);//string
        SendClientMessage(ID,0xFF9900AA,str);//Sends the other person a message
        format(str, sizeof(str),"You had set %s VIP Level to 1 (BRONZE VIP)!",pname);//string
        SendClientMessage(playerid,0xFF9900AA,str);//Sends you a message
        PlayerData[ID][vip] = 1;//Sets the other person vip level to 1
        format(str, sizeof(str), "%s has set %s's VIP Level to 1 (Bronze VIP)\r\n", Nam, pname);
        VIPLog = fopen("VIPLog.txt", io_append);
        fopen(VIPLog, str);
        fclose(VIPLog);
    }
    if(vlevel == 2)//if you select vip level 2
    {
        if(PlayerData[ID][vip] == 2) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 2 vip!");//If the person you attempt to /setvip that is already level 2 vip, it will show that
        GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//defines playerid name
        GetPlayerName(ID,pname,MAX_PLAYER_NAME);//defines other person name
        format(str, sizeof(str),"%s has set your VIP Level to 2 (SILVER VIP)!",Nam);//string
        SendClientMessage(ID,0xFF9900AA,str);// Sends the other person a message
        format(str, sizeof(str),"You had set %s VIP Level to 2 (SILVER VIP)!",pname);//string
        SendClientMessage(playerid,0xFF9900AA,str);//sends you a message
        PlayerData[ID][vip] = 2;//sets the other person vip level to 2
        format(str, sizeof(str), "%s has set %s's VIP Level to 2 (Silver VIP)\r\n", Nam, pname);
        VIPLog = fopen("VIPLog.txt", io_append);
        fopen(VIPLog, str);
        fclose(VIPLog);
    }
    if(vlevel == 3)// if you select vip level 3
    {
        if(PlayerData[ID][vip] == 3) return SendClientMessage(playerid,0xFF0000FF,"ERROR: That person is already level 3 vip!");//if the person you attempt to /setvip that is already level 3 vip, it will show that
        GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//defines playerid name
        GetPlayerName(ID,pname,MAX_PLAYER_NAME);//defines the other person name
        format(str, sizeof(str),"%s has set your VIP Level to 3 (GOLD VIP)!",Nam);//string
        SendClientMessage(ID,0xFF9900AA,str);//sends the other person a message
        format(str, sizeof(str),"You had set %s VIP Level to 3 (GOLD VIP)!",pname);//String
        SendClientMessage(playerid,0xFF9900AA,str);//Sends you a message
        PlayerData[ID][vip] = 3;//sets the other person vip level to 3
        format(str, sizeof(str), "%s has set %s's VIP Level to 3 (Gold VIP)\r\n", Nam, pname);
        VIPLog = fopen("VIPLog.txt", io_append);
        fopen(VIPLog, str);
        fclose(VIPLog);
    }
    return 1;
}
not sure if it works
Reply
#5

Alright thanks. I'll try it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)