24.02.2016, 18:52
Hello @sascha thank you for replying!
But i used you way and i got this :
On Game Mode Init
and on city change :
it complites i dont get errors but when i start the gamemode server shutdown when i delete my code it does not shutdown why is this haping??
But i used you way and i got this :
On Game Mode Init
PHP код:
new File:store = fopen("nextcity.txt", io_read);
new string2[100];
fread(store, string2);
fclose(store);
if(!strcmp(string2, "LasVenturas", true))
{
CurentCity = LasVenturas;
}
else if(!strcmp(string2, "SanFierro", true))
{
CurentCity = SanFierro;
}
else if(!strcmp(string2, "LosSantos", true))
{
CurentCity = LosSantos;
}
PHP код:
if(GameDay == 6 && GameHour == 23 && GameMinute == 59)
{
if(CurentCity == LasVenturas)
{
SendRconCommand("gmx");
GameTextForAll("~w~Server Is Changing ~b~City~n~~w~Please Wait ...",5000,3);
new File:store = fopen("nextcity.txt", io_write);
fwrite(store, "LosSantos");
fclose(store);
return 1;
}
if(CurentCity == LosSantos)
{
SendRconCommand("gmx");
GameTextForAll("~w~Server Is Changing ~b~City~n~~w~Please Wait ...",5000,3);
new File:store = fopen("nextcity.txt", io_write);
fwrite(store, "SanFierro");
fclose(store);
return 1;
}
if(CurentCity == SanFierro)
{
SendRconCommand("gmx");
GameTextForAll("~w~Server Is Changing ~b~City~n~~w~Please Wait ...",5000,3);
new File:store = fopen("nextcity.txt", io_write);
fwrite(store, "LasVenturas"); //For example... if changing it to another city, change the city name
fclose(store);
return 1;
}
}