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
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;
}