SA-MP Forums Archive
Problem - 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: Problem (/showthread.php?tid=296076)



Problem - zombieking - 09.11.2011

OK So here is my problem:
It dosent matter what command I use the EFFECT of the command always affects ONLY id 0 no matter who types the command ALWAYS id 0 gets the effect.


Re: Problem - Stigg - 09.11.2011

Can we see the code Cant help without it.


Re: Problem - zombieking - 09.11.2011

Well I said ALL THE COMMANDS NO MATTER WHAT COMMAND it will only affect id 0


Re: Problem - zombieking - 09.11.2011

-BUMP-


Re: Problem - SmiT - 09.11.2011

Are you using sscanf? Had the same problem a while ago - fixed by re-downloading the plugin/include.


Re : Re: Problem - decondelite - 09.11.2011

Quote:
Originally Posted by zombieking
Посмотреть сообщение
Well I said ALL THE COMMANDS NO MATTER WHAT COMMAND it will only affect id 0
No matter what you said, do what stigg said please.


Re: Problem - zombieking - 09.11.2011

See , I downloaded the latest sscanf include / plugin multiple times and still not working.


Re: Problem - Kostas' - 09.11.2011

Then post the code here.
No one gonna steal it


Re: Problem - zombieking - 09.11.2011

Well its same with all the commands but I will post one here:
pawn Код:
if (strcmp("/admins",cmdtext,true) == 0)
    {
        SendClientMessage(playerid,red,"Admins online:");
        if(IsPlayerNPC(playerid))
        {
            SendClientMessage(playerid,red,"-");
            return 0;
        }
        for(new i = 0; i < MAX_PLAYERS; i++)
        if(GetPVarInt(playerid,"Adminlevel")==1)
        {
        new string[256];
        format(string,256,"{F5FF00}[Trial Administrator]-{00F5FF}%s",PlayerName(i));
        SendClientMessage(playerid,red,string);
        return 1;
        }
        else if(GetPVarInt(playerid,"Adminlevel")==2)
        {
        new string2[256];
        format(string2,256,"{F5FF00}[General Administrator]-{00F5FF}%s",PlayerName(i));
        SendClientMessage(playerid,red,string2);
        return 1;
        }
        else if(GetPVarInt(playerid,"Adminlevel")==3)
        {
        new string3[256];
        format(string3,256,"{F5FF00}[Senior Administrator]-{00F5FF}%s",PlayerName(i));
        SendClientMessage(playerid,red,string3);
        return 1;
        }
        else if(GetPVarInt(playerid,"Adminlevel")==4)
        {
        new string4[256];
        format(string4,256,"{F5FF00}[Lead Administrator]-{00F5FF}%s",PlayerName(i));
        SendClientMessage(playerid,red,string4);
        return 1;
        }
        else if(GetPVarInt(playerid,"Adminlevel")==5)
        {
        new string5[256];
        format(string5,256,"{F5FF00}[Head Administrator]-{00F5FF}%s",PlayerName(i));
        SendClientMessage(playerid,red,string5);
        return 1;
}
}



Re : Problem - decondelite - 09.11.2011

There's something wrong here:
Код:
for(new i = 0; i < MAX_PLAYERS; i++)
        if(GetPVarInt(playerid,"Adminlevel")==1)
Also, I wouldn't be surprised that playerid gets affected 0 somewhere in your code.