Command Request
#1

Hai. I posted a topic here; https://sampforum.blast.hk/showthread.php?tid=599973

It was about my factions not working. I've isolated the problem and it's my CMD: request however I get no errors or anything. I found a script that has a working command of /request but I only had the .amx so I used the DEamxer and tried to convert it, but that didn't work...

I will post the two commands.

This is from my script that works, but the commands just doesn't...
PHP код:
CMD:request(playeridparams[])
{
    new 
tmp[256];
    if (
orgReq[playerid] > 0)
    {
        
SendClientMessage2(playeridCOLOR_ORANGE"You are already requesting to join an organization.");
        
SendClientMessage2(playeridCOLOR_YELLOW"Your request will not be withdrawn until you are accepted, declined or reconnect.");
        return 
1;
    }
    new 
moneys1 dini_Int(AddDirFile(dir_orgfilesFILE_OSTATS), "max_org");
    if (
moneys1 == 0) return SendClientMessage2(playeridCOLOR_SILVER"There are currently no existing organizations.");
    if (
DoesPlayerHaveMenuOpen(playerid) || GetPlayerDialog(playerid) != -1) return SendClientMessage2(playeridCOLOR_WHITE"SERVER: Please exit your current menu first.");
    new 
tmp3[1028];
    for (new 
orgg 1orgg <= moneys1orgg++)
    {
        
format(tmp10"ORG%d"orgg);
        if (!
dini_Exists(AddDirFile(dir_orgfilestmp))) continue;
        if (
adlvl[playerid] >= 3format(tmp3sizeof(tmp3), "%s\n{%s}%s (%d)\n"tmp3dini_Get(AddDirFile(dir_orgfilestmp), "color"), dini_Get(AddDirFile(dir_orgfilestmp), "name"), orgg);
        else 
format(tmp3sizeof(tmp3), "%s\n{%s}%s\n"tmp3dini_Get(AddDirFile(dir_orgfilestmp), "color"), dini_Get(AddDirFile(dir_orgfilestmp), "name"), orgg);
    }
    
ShowPlayerDialog2(playeridDIALOG_ORG_REQUESTDIALOG_STYLE_LIST"Select an organization to join."tmp3"Select""Cancel");
    return 
1;

Then here is the command that is supposed to work, but the De AMxer didn't do a good job :P

PHP код:
public cmd_request(playerid)
{
    new 
var0[256], var1[256], var2 0var3[256];
    if(
glob1FA5C[playerid])
    {
        
function18CB0(playerid0xFF9900FF"You are already requesting to join an organization.");
        
function18CB0(playerid0xFFFF00FF"Your request will not be withdrawn until you are accepted, declined or reconnect.");
        return 
1;
    }
    new 
var4 function1598(function18BB4(19486121948648), "max_org");
    if(!
var4)
    {
        return 
function18CB0(playerid0xDDDDDDFF"There are currently no existing organizations.");
    }
    if(
functionC05EC(playerid) || -!= function243A8(playerid))
    {
        return 
function18CB0(playerid0xFFFFFFFF"SERVER: Please exit your current menu first.");
    }
    new 
var5[1028], var6[400];
    
format(var51028"%sOrganization\tMembers\tLeader"var5);
    for(new 
var7 1var7 <= var4var7++)
    {
        
var2 0;
        
format(var010"ORG%d"var7);
        new 
var8 function1598(function18BB4(1949228var0), "maxmembers");
        
var6 function1B54(function18BB4(1949308var0), "leader");
        for(new 
var9 1var9 <= var8var9++)
        {
            
format(var112"member%d"var9);
            if(
strcmp(function1B54(function18BB4(1949408var0), var1), "server"))
            {
                
var2++;
            }
        }
        if(
strcmp(var6"server"))
        {
            
format(var3256"%s"var6);
        }
        else
        {
            
format(var3256"None");
        }
        if(!
functionDF8(function18BB4(1949532var0)))
        {
        }
        else
        {
        }
    }
    if(
var2 == var8)
    {
        
format(var51028"%s\n{%s}%s (%d)\tFull\t%s\n"var5function1B54(function18BB4(1949664var0), "color"), function1B54(function18BB4(1949724var0), "name"), var7var3);
    }
    else if(
var2 != var8)
    {
        
format(var51028"%s\n{%s}%s (%d)\tAvaliable\t%s\n"var5function1B54(function18BB4(1949896var0), "color"), function1B54(function18BB4(1949956var0), "name"), var7var3);
    }
    
function24288(playerid651950012var519501401950168);
    return 
1;

I've tried to convert them, but my Pawno stops working. With your amazing brains I'm sure you guys could help me out.

As always who ever helps me will get +1 Rep.

Thanks for your time.
Reply
#2

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)