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



Paycheck CMD - LifeRah - 12.05.2016

can someone please make me a CMD to show next paycheck time left??


Re: Paycheck CMD - Sew_Sumi - 12.05.2016

Would help if you handed out some code to aid in making this command, but you know, Scripting Help isn't really for making you a command...


But if someone was going to be kind, then they'd need some basis to go on, rather than nothing and guess everything.


Re: Paycheck CMD - LifeRah - 13.05.2016

kindly, someone help me!


Re: Paycheck CMD - Dayrion - 13.05.2016

« Would help if you handed out some code to aid in making this command, but you know, Scripting Help isn't really for making you a command...
But if someone was going to be kind, then they'd need some basis to go on, rather than nothing and guess everything. » - Sew_Suni


Re: Paycheck CMD - Sew_Sumi - 13.05.2016

Quote:
Originally Posted by Travalle
Посмотреть сообщение
kindly, someone help me!
Chuck up your code from your paycheck lol... You gotta put some code up hehe.


Re: Paycheck CMD - LifeRah - 14.05.2016

Listen This is the code:-
PHP код:
Line 1239:-YCMD:nextpaycheck(playeridparams[], help) {
    
Line 1240:-new string[128];
    
Line 1241:-new PlayerInfo;
    
Line 1242:-format(stringsizeof(string), "Total Minutes since last Paycheck: %d  Approximate time until next Paycheck: %d"floatround(PlayerInfo[playerid][pConnectSeconds]/60), floatround((3600-PlayerInfo[playerid][pConnectSeconds]) / 60));
    
Line 1243:-SendClientMessage(playeridCOLOR_YELLOWstring);
    
Line 1244:-SendClientMessage(playeridCOLOR_GRAD2"Please note that you will not accrue time if your game is paused.");
    
Line 1245:-return 1;
Line 1246:-} 
And i am getting this error:-
PHP код:
wcrp\rp.pwn(1242) : error 028invalid subscript (not an array or too many subscripts): "PlayerInfo"
wcrp\rp.pwn(1242) : warning 215expression has no effect
wcrp
\rp.pwn(1242) : error 001expected token";"but found "]"
wcrp\rp.pwn(1242) : error 029invalid expressionassumed zero
wcrp
\rp.pwn(1242) : fatal error 107too many error messages on one line

Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase


4 Errors




Re: Paycheck CMD - Sew_Sumi - 14.05.2016

Show your PlayerInfo enum.