Hello There, Guest! Login or Register


OnRconCommand
#1
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;
}
Reply
#2
Its a SA:MP bug, It only works in filterscripts.
Reply
#3
ye i just noticed it  :+
http://forum.sa-mp.com/index.php?PHPSESS...#msg328729

EDIT:
do you know where i can get a list of coordinates for places such airplane interior in one of caligula's mission
Reply
#4
(05-06-2008, 11:19 PM)Motorola link Wrote: ye i just noticed it  :+
http://forum.sa-mp.com/index.php?PHPSESS...#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!
Reply
#5
huh i already use that
Reply