SA-MP Forums Archive
Won't show the ID for ADuty - 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: Won't show the ID for ADuty (/showthread.php?tid=520093)



Won't show the ID for ADuty - Swyft™ - 17.06.2014

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) {
            if (PlayerInfo[i][pADuty] != 0)
                format(string, sizeof(string), "[ATM %d]\n{FFFFFF}/atm to use this machine.", atmid);
            else
                format(string, sizeof(string), "[ATM]\n{FFFFFF}/atm to use this machine.");
        }
So, when I do /aduty it won't show the ATM ID... I don't have a "playerid" under this so I had to use I, am I doing something wrong?


Re: Won't show the ID for ADuty - VladimirMark - 17.06.2014

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) {
            if (PlayerInfo[i][pADuty] != 0)
                format(string, sizeof(string), "[ATM %d]\n{FFFFFF}/atm to use this machine.", atmid);
            else
                format(string, sizeof(string), "[ATM]\n{FFFFFF}/atm to use this machine.", atmid);
        }
OR use this if it doesn't work

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) {
            if (PlayerInfo[i][pADuty] != 0)
                format(string, sizeof(string), "[ATM %d]\n{FFFFFF}/atm to use this machine.", atmid);
        }



Re: Won't show the ID for ADuty - Swyft™ - 17.06.2014

Quote:
Originally Posted by VladimirMark
Посмотреть сообщение
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) {
            if (PlayerInfo[i][pADuty] != 0)
                format(string, sizeof(string), "[ATM %d]\n{FFFFFF}/atm to use this machine.", atmid);
            else
                format(string, sizeof(string), "[ATM]\n{FFFFFF}/atm to use this machine.", atmid);
        }
OR use this if it doesn't work

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) {
            if (PlayerInfo[i][pADuty] != 0)
                format(string, sizeof(string), "[ATM %d]\n{FFFFFF}/atm to use this machine.", atmid);
        }
VladimirMark, I appreciate that you're trying but you gave me the exact same code.... And just added ", atmid" to a string that doesn't have a variable.

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) {
            if (PlayerInfo[i][pADuty] != 0)
                format(string, sizeof(string), "[ATM %d]\n{FFFFFF}/atm to use this machine.", atmid);
            else
                format(string, sizeof(string), "[ATM]\n{FFFFFF}/atm to use this machine.", atmid); // Why would this work?
        }



Re: Won't show the ID for ADuty - Rittik - 17.06.2014

Show your full /aduty code.


Re: Won't show the ID for ADuty - Swyft™ - 17.06.2014

Quote:
Originally Posted by Rittik
Посмотреть сообщение
Show your full /aduty code.
This isn't my /aduty code, and that's not the issue. My issue is, under public I do not have a playerid so I have to do

pawn Код:
for(new i = 0; i > MAX_PLAYERS; i+++) // or however it's suppose to go.
but it's not working, what does my /aduty code have to do with this?


Re: Won't show the ID for ADuty - Laure - 17.06.2014

Huh? What connection does atm and /aduty has? Though i think it will be good to see your command.


Re: Won't show the ID for ADuty - Swyft™ - 17.06.2014

Quote:
Originally Posted by Imperor
Посмотреть сообщение
Huh? What connection does atm and /aduty has? Though i think it will be good to see your command.
[ATM] is under a public not a command. The /aduty command works perfectly fine and doesn't have anything to do with this.


Re: Won't show the ID for ADuty - Laure - 17.06.2014

Well, show the public of atm.


Re: Won't show the ID for ADuty - Swyft™ - 17.06.2014

Quote:
Originally Posted by Imperor
Посмотреть сообщение
Then, can i atleast see its public coding?
Look at the top of the thread.


Re: Won't show the ID for ADuty - Rittik - 17.06.2014

Is "string" globalized in the code.