nicht aufruft/ausführt.
Okay, dann mach es mal so:
//Im Gamemode
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_JUMP && IsPlayerInVehicle(playerid, busa)) return file_set_content("Bot.txt","1");
return 1;
}
//Im Npc-Skript
//Irgendwo, wo das PlayBack gestartet wird:
SetTimer("@Check",499,1);
@Check();@Check() {
if(!strval(file_get_content("Bot.txt"))) return 0;
PauseRecordingPlayback();
return file_set_content("Bot.txt","0");
}
stock file_set_content(const path[], const string[]) {
new File:f = fopen(path,io_write);
return fwrite(f,string),fclose(f);
}
stock file_get_content(const path[]) {
new e_e[4]="0";
if(!fexist(path)) return e_e;
new File:f = fopen(path,io_read),string[4];
return fread(f,string),fclose(f),string;
}
Probier es mal so, aus dem Kopf geschrieben, sollte aber klappen ![]()
mfg. ![]()