Question on /updates
#1

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

Reply
#2

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

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;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)