Hey Brotfischer,
ich benutze einen Edit von Benne Tjongs SARP.
Aber ich habe folgendes Problem,
wenn 2 oder mehrere Spieler auf dem Server sind (an verschiedenen Orten)
und du springst neben einem auto oder spieler verschwindet dieser.
stehen aber alle an einer Stelle passiert dies nicht...
ich denke es hat damit was zu tun...
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
//format(tmpstring,sizeof(tmpstring),"Taste: %d",newkeys);
//SendClientMessage(playerid,COLOR_GREEN,tmpstring);
if(newkeys == 1)
{
format(tmpstring,sizeof(tmpstring),"%d/10",hunger[playerid]);
if(hunger[playerid] > 5)
{
format(tmpstring,sizeof(tmpstring),"~g~~h~ Nahrung: %s",tmpstring);
}
else if(hunger[playerid] < 3)
{
format(tmpstring,sizeof(tmpstring),"~r~~h~ Nahrung: %s",tmpstring);
}
else
{
format(tmpstring,sizeof(tmpstring),"~y~~h~ Nahrung: %s",tmpstring);
}
TextDrawSetString (checks[playerid]," ");
TextDrawSetString (checks[playerid],tmpstring);
SetTimerEx("txtleer",5000,0,"t",playerid);
}
if(newkeys == 512 || newkeys == 520) {
if(beruf[playerid] == 1 && dienst[playerid] == 1) {
if(sirene[playerid]) sirene[playerid] = false; else sirene[playerid] = true;
sirenentyp[playerid] = 0;
} else if(beruf[playerid] == 2 && dienst[playerid] == 1) {
if(sirene[playerid]) sirene[playerid] = false; else sirene[playerid] = true;
sirenentyp[playerid] = 1;
} else if(beruf[playerid] == 6 && dienst[playerid] == 1) {
if(sirene[playerid]) sirene[playerid] = false; else sirene[playerid] = true;
sirenentyp[playerid] = 2;
}
for(new i=0;i<MAX_PLAYERS;i++) {
TextDrawHideForPlayer(i,SireneLeiste);
TextDrawHideForPlayer(i,JobSirenen[sirenentyp[playerid]]);
TextDrawHideForPlayer(i,JobSirenen[sirenentyp[playerid]+3]);
}
}
if(IsKeyJustDown(KEY_JUMP,newkeys,oldkeys)) {
if(gPlayerObserving[playerid] >= 0 && IsKeyJustDown(KEY_JUMP,newkeys,oldkeys)) {
ObserverSwitchToNextPlayer(playerid);
}
if(IsPlayerInAnyVehicle(playerid)) {
if(hatbombe[GetPlayerVehicleID(playerid)] == true) {
hatbombe[GetPlayerVehicleID(playerid)] = false;
SetTimerEx("Bombe",bombenzeit[GetPlayerVehicleID(playerid)] * 1000,0,"t",GetPlayerVehicleID(playerid));
GameTextForPlayer(playerid,"~r~Bombe aktiviert",3000,6);
}
}
}
if(newkeys==16) {
if(pannenfreeze[playerid] == true) {
pannenfreeze[playerid] = false;
SetTimerEx("Unfreeze",3000,0,"t",playerid);
RemovePlayerFromVehicle(playerid);
}
}
return 1;
}
MFG Johannes