SA-MP Forums Archive
Need Help. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Need Help. (/showthread.php?tid=634213)



Need Help. - ongnung147 - 15.05.2017

I WANT DO SET VIP TIME IS 30DAYS , BUT ME DON'T KNOW TIME.
Код:
CMD:setvip(playerid,params[])
{
    
    if(pInfo[playerid][pAdminLevel] >= 5)
    {
    new targetid,level,string[256],months;
    if(sscanf(params, "ud", targetid, level,months)) 
    {
        SendClientMessage(playerid,-1,"USAGE: /setvip [player] [level] [months]");
        SendClientMessage(playerid,-1,"Available Levels:  |1| Bronze |2| Silver |3| Gold ");
        return 1;
    }
    format(string, sizeof(string), "%s %s da cho vip %s.",GetAdminName(playerid),PlayerName(playerid),PlayerName(targetid));
    SendClientMessageToAll(-1,string);
    }
    else {
    SendClientMessage(playerid,COLOR_RED,"{FF0000}Ban khong phai admin.!");
    }
    return 1;
}



Re: Need Help. - Logic_ - 15.05.2017

How do you save the player data?


Re: Need Help. - aoky - 15.05.2017

Are you using dini or mysql?


Re: Need Help. - zedshadowzw - 15.05.2017

1 month is 30 days. Which means you should just
/setvip [player] [level] 1 <----- 1 Month


Re: Need Help. - coool - 15.05.2017

Consider a tutorial.


Re: Need Help. - ongnung147 - 15.05.2017

i use .ini