SA-MP Forums Archive
Question on /updates - 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: Question on /updates (/showthread.php?tid=660873)



Question on /updates - simpleman - 16.11.2018

Hi guys,

I want to make a command "/updates [version number]" that pops up as a dialog and explains what has been added, but I am having troubles making it.

Can someone please help, thank you




Re: Question on /updates - TheToretto - 16.11.2018

Use sscanf and MySQL if you want to prevent from editing the script everytime.


Re: Question on /updates - Flofey - 16.11.2018

Meant something like this?
PHP код:
#include <a_samp>
#include <zcmd>
#include <sscanf2>


CMD:updates(playerid,params[])
{
    new 
version;
    if(
sscanf(params,"i",version)) return SendClientMessage(playerid, -1,"/updates [version]");
    if(
version == 1)
    {
        
SendClientMessage(playerid,-1,"Updates version 1"); //instead of this sendclientmessage put the dialog you want including the updates you wanted.
    
}
    if(
version == 2)
    {
        
SendClientMessage(playerid,-1,"Updates version 2");
    }    
    if(
version == 3)
    {
        
SendClientMessage(playerid,-1,"Updates version 3");
    }    
    if(
version == 4)
    {
        
SendClientMessage(playerid,-1,"Updates version 4");
    }    
    if(
version == 5)
    {
        
SendClientMessage(playerid,-1,"Updates version 5");
    }
    return 
1;