Las Venturas Playground
OnRconCommand - Printable Version

+- Las Venturas Playground (https://forum.sa-mp.nl)
+-- Forum: Miscellaneous (https://forum.sa-mp.nl/forum-4.html)
+--- Forum: Gaming (https://forum.sa-mp.nl/forum-27.html)
+--- Thread: OnRconCommand (/thread-8522.html)



OnRconCommand - MoToRoLa - 05-06-2008

idk whats happening my script, the OnRconCommand isnt working, i have tried the most simply scripts, and it fails even for them, im sure its some problem of my pc or pawno  :( because if it werent that way, simply OnRconCommands should work. yes. i have tested it with other gamemodes and nothing  :?
EDIT: i used this sample pastebin i downloaded and it didnt work, so theres no way it fails
Code:
public OnRconCommand(cmd[])
{
    if(strcmp(cmd, "gtaiv", true) == 0)
    {
        new year, month, day, hour, minute, second;
        new rsecond, rminute, rhour, rday, rmonth;
        new psecond, pminute, phour, pday;
        gettime(hour, minute, second);
        getdate(year, month, day);
        if(year != 2008) return printf("Wrong year! (%d)", year);
        if(month >= 4 && day >= 29 && hour >= 23 && minute >= 0 && second >= 0) return print("GTA IV is already released!");
        if(month == 4 && day == 29 && hour == 23 && minute == 0) return print("GTA IV RELEASE MINUTE!!!");
        if(month <= 4 && day <= 29 && hour <= 23 && minute < 60 && second < 60)
        {
            if(second < 60)
            {
                rsecond = 60-second;
                if(rsecond > 0) psecond = 1;
            }
            if(minute < 60)
            {
                rminute = 60-minute;
                if(psecond) rminute--;
                if(rminute > 0) pminute = 1;
            }
            if(hour < 24)
            {
                rhour = 24-hour;
                if(pminute) rhour--;
                if(rhour > 0) phour = 1;
            }
            if(day < 29 && month == 4)
            {
                rday = 29-day;
                if(phour) rday--;
                if(rday > 0) pday = 1;
            }
            if(day > 29 && month < 4)
            {
                if(month == 1 || month == 3)
                {
                    rday = 31-day;
                }
                if(month == 2)
                {
                    rday = 30-day;
                }
                if(phour) rday--;
                if(rday > 0) pday = 1;
            }
            if(month < 4)
            {
                rmonth = 4-month;
                if(pday) rmonth--;
            }
            printf("%d month, %d days, %d hours, %d minutes, %d seconds", rmonth, rday, rhour, rminute, rsecond);
        }
        return 1;
    }
    return 1;
}



Re: OnRconCommand - Jay - 05-06-2008

Its a SA:MP bug, It only works in filterscripts.


Re: OnRconCommand - MoToRoLa - 05-06-2008

ye i just noticed it  :+
http://forum.sa-mp.com/index.php?PHPSESSID=0628a78ba3c655dd264aba56cccc02a1&topic=45184.msg328729#msg328729

EDIT:
do you know where i can get a list of coordinates for places such airplane interior in one of caligula's mission


Re: OnRconCommand - Lodewijk - 05-07-2008

(05-06-2008, 11:19 PM)Motorola link Wrote: ye i just noticed it  :+
http://forum.sa-mp.com/index.php?PHPSESSID=0628a78ba3c655dd264aba56cccc02a1&topic=45184.msg328729#msg328729

EDIT:
do you know where i can get a list of coordinates for places such airplane interior in one of caligula's mission
Try sa-mp wiki!


Re: OnRconCommand - MoToRoLa - 05-12-2008

huh i already use that