Hey, ich habe ein problem und zwar wenn /rcon weather[zahl] eingebe ändert das wetter zwar aber springt sofort wieder um auf das normale.
Wie kann ich das wegmachen!?
Wetter System
- Anonymous
- Geschlossen
- Erledigt
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
-
-
dann hast du im script eingestellt das es nicht veränderbar ist
-
Und wie stelle ich das um!?
-
Suich nach GetWeather und SetWeather
#FairNet
-
GetWeather ist nur als Befehl: if(strcmp(cmd, "/getweather", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Du bist nicht berechtigt, diesen Befehl zu benutzen !");
return 1;
}
format(string, sizeof(string), "Los Santos: %d, San Fierro: %d, Las Venturas: %d",wLS,wSF,wLV);
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
return 1;
}
und SetWeather gibts nciht -
Jetzt muss irwo dies definiert sein...
wLS
#FairNet
-
Such mal nach "OnRconCommand" und dann den RCON Befehl
-
von wLS sind einige sachen rauslöschen!?
-
nix löschen xD
#FairNet
-
poste alles was damit zu tuen hat hier rein.
-
-
new:new wLS;
new wSF;
new wLV;
if(dialogid == 4451)
{
if(!response) return 1;
switch(listitem)
{
case 0:
{
format(string, sizeof(string), "Los Santos \nSan Fierro \nLas Venturas");
ShowPlayerDialog(playerid, 4452, DIALOG_STYLE_LIST, "Wetter - Sonne", string, "Auswählen", "Abbrechen");
return 1;
}
case 1:
{//rain
format(string, sizeof(string), "Los Santos \nSan Fierro \nLas Venturas");
ShowPlayerDialog(playerid, 4453, DIALOG_STYLE_LIST, "Wetter - Sonne", string, "Auswählen", "Abbrechen");
return 1;
}
case 2:
{//Fog
format(string, sizeof(string), "Los Santos \nSan Fierro \nLas Venturas");
ShowPlayerDialog(playerid, 4454, DIALOG_STYLE_LIST, "Wetter - Sonne", string, "Auswählen", "Abbrechen");
return 1;
}
default: SendClientMessage(playerid, COLOR_GRAD2, "Error.");
}
}
if(dialogid == 4454)
{
if(!response) return 1;
switch(listitem)
{
case 0:
{
wLS = 9;
return 1;
}
case 1:
{//rain
wSF = 9;
return 1;
}
case 2:
{//Fog
wLV = 9;
return 1;
}
default: SendClientMessage(playerid, COLOR_GRAD2, "Error.");
}
}
if(dialogid == 4453)
{
if(!response) return 1;
switch(listitem)
{
case 0:
{
wLS = 16;
return 1;
}
case 1:
{//rain
wSF = 16;
return 1;
}
case 2:
{//Fog
wLV = 16;
return 1;
}
default: SendClientMessage(playerid, COLOR_GRAD2, "Error.");
}
}
if(dialogid == 4452)
{
if(!response) return 1;
switch(listitem)
{
case 0:
{
wLS = 1;
return 1;
}
case 1:
{//rain
wSF = 1;
return 1;
}
case 2:
{//Fog
wLV = 1;
return 1;
}
default: SendClientMessage(playerid, COLOR_GRAD2, "Error.");
}
}
new w = GetPlayerWeatherCity(i);
if(w==2) {if(PlayerInfo[i][pJailed] != 4){SetPlayerWeather(i, wLS); }}
else if(w==3){if(PlayerInfo[i][pJailed] != 4){SetPlayerWeather(i, wLV);}}
else if(w==4){if(PlayerInfo[i][pJailed] != 4){SetPlayerWeather(i, wSF);}}
else {if(PlayerInfo[i][pJailed] != 4) {SetPlayerWeather(i, 1); }}
if(!IsPlayerInAnyVehicle(i))
{
if(speedcount[i] > 0)
{
speedcount[i] = 0;
}
}
public LoadStuff()
{
new arrCoords[11][64];
new strFromFile2[256];
new File: file = fopen("stuff.jy", io_read);
if (file)
{
fread(file, strFromFile2);
split(strFromFile2, arrCoords, ',');
Jackpot = strval(arrCoords[0]);
Tax = strval(arrCoords[1]);
TaxValue = strval(arrCoords[2]);
Security = strval(arrCoords[3]);
wLS = strval(arrCoords[4]);
wSF = strval(arrCoords[5]);
wLV = strval(arrCoords[6]);
GangZones[0] = strval(arrCoords[7]);
GangZones[1] = strval(arrCoords[8]);
GangZones[2] = strval(arrCoords[9]);
GangZones[3] = strval(arrCoords[10]);
//House_Index = strval(arrCoords[4]);
printf("** Stuff loaded Weather_LS: %d, Weather_SF: %d, Weather_LV: %d",wLS,wSF,wLV);
fclose(file);
if(Security == 0 || Security == 1)
{
}
else
{
GameModeExit();
}
}
else
{
GameModeExit();
}
return 1;
}
public SaveStuff()
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "$%d,$%d,$%d,%d,%d,%d,%d,%d,%d,%d,%d", Jackpot,Tax,TaxValue,Security,wLS,wSF,wLV,GangZones[0],GangZones[1],GangZones[2],GangZones[3]);
new File: file2 = fopen("stuff.jy", io_write);
fwrite(file2, coordsstring);
fclose(file2);
return 1;
}
if(strcmp(cmd, "/getweather", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessage(playerid, COLOR_GRAD2, "Du bist nicht berechtigt, diesen Befehl zu benutzen !");
return 1;
}
format(string, sizeof(string), "Los Santos: %d, San Fierro: %d, Las Venturas: %d",wLS,wSF,wLV);
SendClientMessage(playerid, COLOR_GRAD2, string);
return 1;
}
return 1;
}
new SunnyWeather[11] = {1,2,3,4,5,6,7,9,10,11,14},
GettingBadWeather[7] = {8,30,31,38,39,9,32},
BadWeather[2] = {16,32},
MorningWeather[4] = { 46, 47, 48, 49};
public CreateWeather()
{
new hour, minute, second;
gettime(hour, minute, second);
printf("Weather Change");
printf(" LS: %d, SF: %d, LV: %d",wLS,wSF,wLV);
if(hour != 6 || hour != 7 || hour != 8)
{
if(wLS == 1 || wSF == 37 || wLV == 19)
{
wLS = SunnyWeather[random(sizeof(SunnyWeather))];
wSF = SunnyWeather[random(sizeof(SunnyWeather))];
wLV = SunnyWeather[random(sizeof(SunnyWeather))];
printf("%d, %d, %d",wLS,wSF,wLV);
}
if(wLS >= 1 && wLS <= 7 || wSF >= 1 && wSF <= 7 || wLV >= 1 && wLV <= 7)
{
wLS = GettingBadWeather[random(sizeof(GettingBadWeather))];
wSF = GettingBadWeather[random(sizeof(GettingBadWeather))];
wLV = GettingBadWeather[random(sizeof(GettingBadWeather))];
}
if(wLS == 8 || wLS == 30 || wLS == 31 || wLS == 38 || wLS == 39
|| wLS == 4 || wLS == 16
|| wSF == 8 || wSF == 30 || wSF == 31 || wSF == 38 || wSF == 39
|| wSF == 4 || wSF == 16
|| wLV == 8 || wLV == 30 || wLV == 31 || wLV == 38 || wLV == 39
|| wLV == 4 || wLV == 16)
{
new rand = random(6);
if(rand == 0 || rand == 3)
{
wLS = BadWeather[random(sizeof(BadWeather))];
wSF = BadWeather[random(sizeof(BadWeather))];
wLV = BadWeather[random(sizeof(BadWeather))];
}
else
{
wLS = SunnyWeather[random(sizeof(SunnyWeather))];
wSF = SunnyWeather[random(sizeof(SunnyWeather))];
wLV = SunnyWeather[random(sizeof(SunnyWeather))];
}
}
}
else
{
wLS = MorningWeather[random(sizeof(MorningWeather))];
wSF = MorningWeather[random(sizeof(MorningWeather))];
wLV = MorningWeather[random(sizeof(MorningWeather))];
}
SaveStuff();
return 1;
} -
breadfish.de
Hat das Thema geschlossen.