Ich versuche gerade Die /enter Funktion Umzuschreiben so das man Eingabetatste Drücken muss
habe imr das aus der Wiki Rausgeholt und So Gemacht
//if(strcmp(cmd, "/enter", true) == 0)
if (newkeys & KEY_ACTION)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
//printf("Found House :%d",i);
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Willkommen Zuhause", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
//printf("Found House :%d",i);
if(!IsACop(playerid) && i == 3)
{
SendClientMessage(playerid, COLOR_GREY, "Nur Polizisten!");
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Außerhalb der Zone", 5000, 1);
return 1;
}
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-%d$~n~~w~tippe /exit~n~um auszusteigen", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
BizzInfo[i][bProducts]--;
OnPropUpdate();
GameTextForPlayer(playerid, string, 5000, 3);
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
PlayerInfo[playerid][pLocal] = i+99;
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s hat %d$ bezahlt um das Unternehmen %d zu betreten", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
//PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Du hast nicht genug Geld!", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(SBizzInfo[i][sbLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
return 1;
}
if(SBizzInfo[i][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Außerhalb der Zone", 5000, 1);
return 1;
}
if(i == 10)
{
PaintballPlayers ++;
PlayerPaintballing[playerid] = 1;
new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
}
else if(i == 11)
{
PlayerKarting[playerid] = 1;
SendClientMessage(playerid, TEAM_GROVE_COLOR, "Du kannst am Kart Race teilnehmen. Steig in ein Kart.");
}
else
{
return 1;
}
GivePlayerMoney(playerid,-SBizzInfo[i][sbEntranceCost]);
gSpentCash[playerid] = GetPlayerMoney(playerid);
SBizzInfo[i][sbProducts]--;
SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s hat %d$ bezahlt um das Unternehmen %d zu betreten", dood, SBizzInfo[i][sbEntranceCost], i);
printf("%s", string);
PayLog(string);
OnPropUpdate();
}
}
else
{
GameTextForPlayer(playerid, "~r~Du hast nicht genug Geld!", 5000, 1);
}
}
}
if (PlayerToPoint(3.0, playerid,-2162.2554,-2385.9541,30.6250))
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
GameTextForPlayer(playerid, "~w~Willkommen in der Stadthalle", 5000, 1);
PlayerInfo[playerid][pInt] = 3;
PlayerInfo[playerid][pLocal] = 241;
}
else if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
{
GameTextForPlayer(playerid, "~w~Willkommen zu 8ball", 5000, 1);
SetPlayerInterior(playerid,7);
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen zu Dirt Track", 5000, 1);
SetPlayerInterior(playerid,4);
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
}
else if (PlayerToPoint(3.0, playerid,-1605.4897,711.7740,13.8672)) //PD Eingang
{
SetPlayerInterior(playerid,6);
SetPlayerPos(playerid,246.9030,63.2616,1003.6406);
}
else if (PlayerToPoint(3.0, playerid,-2336.7227,-166.9267,35.5547))//BSW Eingang
{
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,363.4130,-74.5787,1001.5078);
}
else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen zum Stunting Track", 5000, 1);
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
}
}
return 1;
}
Ich Bekomme aber Einen Define Error Und Bin mir nicht sicher wie ich Die tatse Definieren Soll
error 017: undefined symbol "newkeys"
Ich hoffe Jemand Kann mir helfen
Mfg PrOOnOOb
/enter in Eingabetaste ersetzen
- PrOOnOOb
- Geschlossen
- Erledigt
-
-
das gehört unter "OnPlayerStateChange"
-
Habe ich gamcht Und wieder der gleich error
weis den keiner wie ich das defeniere? -
Änder mal dein public in das: public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
mfg
-
Nöp 5 neue Fehler
error 017: undefined symbol "newstate"
error 017: undefined symbol "newstate"
error 017: undefined symbol "newstate"
error 017: undefined symbol "newstate"
error 017: undefined symbol "newstate"
Die Fehlerausgebenden Zeilen sehen so aus.
if(newstate == PLAYER_STATE_ONFOOT) -
HALT!!!!
In dieses Public muss das rein sry
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}Also lass das Public
OnPlayerStateChange(playerid, newstate, oldstate)
so wie es ist -
Also ich seh in deinem Code kein newstate und Firefox Suche findet auch nix.
Aber das sollte helfen.
new newstate = GetPlayerState(playerid);
if(newstate == PLAYER_STATE_ONFOOT)
-
Er hat sein code unter
public OnPlayerStateChange(playerid, newstate, oldstate)
Eingefügt und es dann umbenannt das war der fehler^^ -
Ehm ja nur kann ja sein, dass er außerhalb von OnPlayerstateChange, genauer gesagt unter OnPlayerKeyStateChange in einem anderen Codeschnipsel, welcher nicht gepostet wurde, den State abfragt. Ansonsten hätte er ja keine Error bekommen wenn er es nicht verwendete .
-
habe es jetzt so Gemacht und immer noch Error
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
if (newkeys & KEY_ACTION)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
//printf("Found House :%d",i);
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Willkommen Zuhause", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
//printf("Found House :%d",i);
if(!IsACop(playerid) && i == 3)
{
SendClientMessage(playerid, COLOR_GREY, "Nur Polizisten!");
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Außerhalb der Zone", 5000, 1);
return 1;
}
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-%d$~n~~w~tippe /exit~n~um auszusteigen", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
BizzInfo[i][bProducts]--;
OnPropUpdate();
GameTextForPlayer(playerid, string, 5000, 3);
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
PlayerInfo[playerid][pLocal] = i+99;
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s hat %d$ bezahlt um das Unternehmen %d zu betreten", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
//PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Du hast nicht genug Geld!", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(SBizzInfo[i][sbLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
return 1;
}
if(SBizzInfo[i][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Außerhalb der Zone", 5000, 1);
return 1;
}
if(i == 10)
{
PaintballPlayers ++;
PlayerPaintballing[playerid] = 1;
new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
}
else if(i == 11)
{
PlayerKarting[playerid] = 1;
SendClientMessage(playerid, TEAM_GROVE_COLOR, "Du kannst am Kart Race teilnehmen. Steig in ein Kart.");
}
else
{
return 1;
}
GivePlayerMoney(playerid,-SBizzInfo[i][sbEntranceCost]);
gSpentCash[playerid] = GetPlayerMoney(playerid);
SBizzInfo[i][sbProducts]--;
SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s hat %d$ bezahlt um das Unternehmen %d zu betreten", dood, SBizzInfo[i][sbEntranceCost], i);
printf("%s", string);
PayLog(string);
OnPropUpdate();
}
}
else
{
GameTextForPlayer(playerid, "~r~Du hast nicht genug Geld!", 5000, 1);
}
}
}
if (PlayerToPoint(3.0, playerid,-2162.2554,-2385.9541,30.6250))
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
GameTextForPlayer(playerid, "~w~Willkommen in der Stadthalle", 5000, 1);
PlayerInfo[playerid][pInt] = 3;
PlayerInfo[playerid][pLocal] = 241;
}
else if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
{
GameTextForPlayer(playerid, "~w~Willkommen zu 8ball", 5000, 1);
SetPlayerInterior(playerid,7);
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen zu Dirt Track", 5000, 1);
SetPlayerInterior(playerid,4);
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
}
else if (PlayerToPoint(3.0, playerid,-1605.4897,711.7740,13.8672)) //PD Eingang
{
SetPlayerInterior(playerid,6);
SetPlayerPos(playerid,246.9030,63.2616,1003.6406);
}
else if (PlayerToPoint(3.0, playerid,-2336.7227,-166.9267,35.5547))//BSW Eingang
{
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,363.4130,-74.5787,1001.5078);
}
else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen zum Stunting Track", 5000, 1);
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
}
}
return 1;
}C:\Dokumente und Einstellungen\PrOOnOOb\Desktop\asdasd\gf.pwn(3837) : error 017: undefined symbol "string"
C:\Dokumente und Einstellungen\PrOOnOOb\Desktop\asdasd\gf.pwn(3837) : error 017: undefined symbol "string"
C:\Dokumente und Einstellungen\PrOOnOOb\Desktop\asdasd\gf.pwn(3837) : error 029: invalid expression, assumed zero
C:\Dokumente und Einstellungen\PrOOnOOb\Desktop\asdasd\gf.pwn(3837) : fatal error 107: too many error messages on one line -
Mach ganz oben also unter
if(IsPlayerConnected(playerid))
{new string[128];
-
Nächster Error
C:\Dokumente und Einstellungen\PrOOnOOb\Desktop\asdasd\gf.pwn(3955) : warning 209: function "OnPlayerKeyStateChange" should return a value kommt jetzt Die ganze geschichte sieht so aus
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
if (newkeys & KEY_ACTION)
{
if(IsPlayerConnected(playerid))
{
new string[128];
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
//printf("Found House :%d",i);
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Willkommen Zuhause", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
//printf("Found House :%d",i);
if(!IsACop(playerid) && i == 3)
{
SendClientMessage(playerid, COLOR_GREY, "Nur Polizisten!");
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Außerhalb der Zone", 5000, 1);
return 1;
}
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-%d$~n~~w~tippe /exit~n~um auszusteigen", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
BizzInfo[i][bProducts]--;
OnPropUpdate();
GameTextForPlayer(playerid, string, 5000, 3);
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
PlayerInfo[playerid][pLocal] = i+99;
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s hat %d$ bezahlt um das Unternehmen %d zu betreten", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
//PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Du hast nicht genug Geld!", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(SBizzInfo[i][sbLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
return 1;
}
if(SBizzInfo[i][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Außerhalb der Zone", 5000, 1);
return 1;
}
if(i == 10)
{
PaintballPlayers ++;
PlayerPaintballing[playerid] = 1;
new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
}
else if(i == 11)
{
PlayerKarting[playerid] = 1;
SendClientMessage(playerid, TEAM_GROVE_COLOR, "Du kannst am Kart Race teilnehmen. Steig in ein Kart.");
}
else
{
return 1;
}
GivePlayerMoney(playerid,-SBizzInfo[i][sbEntranceCost]);
gSpentCash[playerid] = GetPlayerMoney(playerid);
SBizzInfo[i][sbProducts]--;
SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s hat %d$ bezahlt um das Unternehmen %d zu betreten", dood, SBizzInfo[i][sbEntranceCost], i);
printf("%s", string);
PayLog(string);
OnPropUpdate();
}
}
else
{
GameTextForPlayer(playerid, "~r~Du hast nicht genug Geld!", 5000, 1);
}
}
}
if (PlayerToPoint(3.0, playerid,-2162.2554,-2385.9541,30.6250))
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
GameTextForPlayer(playerid, "~w~Willkommen in der Stadthalle", 5000, 1);
PlayerInfo[playerid][pInt] = 3;
PlayerInfo[playerid][pLocal] = 241;
}
else if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
{
GameTextForPlayer(playerid, "~w~Willkommen zu 8ball", 5000, 1);
SetPlayerInterior(playerid,7);
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen zu Dirt Track", 5000, 1);
SetPlayerInterior(playerid,4);
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
}
else if (PlayerToPoint(3.0, playerid,-1605.4897,711.7740,13.8672)) //PD Eingang
{
SetPlayerInterior(playerid,6);
SetPlayerPos(playerid,246.9030,63.2616,1003.6406);
}
else if (PlayerToPoint(3.0, playerid,-2336.7227,-166.9267,35.5547))//BSW Eingang
{
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,363.4130,-74.5787,1001.5078);
}
else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen zum Stunting Track", 5000, 1);
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
}
}
return 1;
} -
mach mal das return 1; unten auf return 0; oder ganz weg.
Dan dürfte es gehen -
Nöp auch so das Gleiche
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
if (newkeys & KEY_ACTION)
{
if(IsPlayerConnected(playerid))
{
new string[128];
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
//printf("Found House :%d",i);
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Willkommen Zuhause", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
//printf("Found House :%d",i);
if(!IsACop(playerid) && i == 3)
{
SendClientMessage(playerid, COLOR_GREY, "Nur Polizisten!");
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Außerhalb der Zone", 5000, 1);
return 1;
}
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-%d$~n~~w~tippe /exit~n~um auszusteigen", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
BizzInfo[i][bProducts]--;
OnPropUpdate();
GameTextForPlayer(playerid, string, 5000, 3);
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
PlayerInfo[playerid][pLocal] = i+99;
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s hat %d$ bezahlt um das Unternehmen %d zu betreten", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
//PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Du hast nicht genug Geld!", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(SBizzInfo[i][sbLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
return 1;
}
if(SBizzInfo[i][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Außerhalb der Zone", 5000, 1);
return 1;
}
if(i == 10)
{
PaintballPlayers ++;
PlayerPaintballing[playerid] = 1;
new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
}
else if(i == 11)
{
PlayerKarting[playerid] = 1;
SendClientMessage(playerid, TEAM_GROVE_COLOR, "Du kannst am Kart Race teilnehmen. Steig in ein Kart.");
}
else
{
return 1;
}
GivePlayerMoney(playerid,-SBizzInfo[i][sbEntranceCost]);
gSpentCash[playerid] = GetPlayerMoney(playerid);
SBizzInfo[i][sbProducts]--;
SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s hat %d$ bezahlt um das Unternehmen %d zu betreten", dood, SBizzInfo[i][sbEntranceCost], i);
printf("%s", string);
PayLog(string);
OnPropUpdate();
}
}
else
{
GameTextForPlayer(playerid, "~r~Du hast nicht genug Geld!", 5000, 1);
}
}
}
if (PlayerToPoint(3.0, playerid,-2162.2554,-2385.9541,30.6250))
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
GameTextForPlayer(playerid, "~w~Willkommen in der Stadthalle", 5000, 1);
PlayerInfo[playerid][pInt] = 3;
PlayerInfo[playerid][pLocal] = 241;
}
else if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
{
GameTextForPlayer(playerid, "~w~Willkommen zu 8ball", 5000, 1);
SetPlayerInterior(playerid,7);
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen zu Dirt Track", 5000, 1);
SetPlayerInterior(playerid,4);
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
}
else if (PlayerToPoint(3.0, playerid,-1605.4897,711.7740,13.8672)) //PD Eingang
{
SetPlayerInterior(playerid,6);
SetPlayerPos(playerid,246.9030,63.2616,1003.6406);
}
else if (PlayerToPoint(3.0, playerid,-2336.7227,-166.9267,35.5547))//BSW Eingang
{
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,363.4130,-74.5787,1001.5078);
}
else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen zum Stunting Track", 5000, 1);
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
}
}
}
auch wen ich unten return 0 mache
Weis den keiner wo das Problem ist? -
Man sollte sich auch ein bischen mit Scripten auskennen wenn man sowas machen will...
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (newkeys & KEY_ACTION)
{
if(IsPlayerConnected(playerid))
{
new string[128];
for(new i = 0; i < sizeof(HouseInfo); i++)
{
if (PlayerToPoint(3, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
{
//printf("Found House :%d",i);
if(PlayerInfo[playerid][pPhousekey] == i || HouseInfo[i][hLock] == 0)
{
SetPlayerInterior(playerid,HouseInfo[i][hInt]);
SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
GameTextForPlayer(playerid, "~w~Willkommen Zuhause", 5000, 1);
PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(BizzInfo); i++)
{
if (PlayerToPoint(3, playerid,BizzInfo[i][bEntranceX], BizzInfo[i][bEntranceY], BizzInfo[i][bEntranceZ]))
{
//printf("Found House :%d",i);
if(!IsACop(playerid) && i == 3)
{
SendClientMessage(playerid, COLOR_GREY, "Nur Polizisten!");
return 1;
}
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= BizzInfo[i][bEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(BizzInfo[i][bLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
return 1;
}
if(BizzInfo[i][bProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Außerhalb der Zone", 5000, 1);
return 1;
}
GivePlayerMoney(playerid,-BizzInfo[i][bEntranceCost]);
format(string, sizeof(string), "~r~-%d$~n~~w~tippe /exit~n~um auszusteigen", BizzInfo[i][bEntranceCost]);
BizzInfo[i][bTill] += BizzInfo[i][bEntranceCost];
ExtortionBiz(i, BizzInfo[i][bEntranceCost]);
BizzInfo[i][bProducts]--;
OnPropUpdate();
GameTextForPlayer(playerid, string, 5000, 3);
}
SetPlayerInterior(playerid,BizzInfo[i][bInterior]);
SetPlayerPos(playerid,BizzInfo[i][bExitX],BizzInfo[i][bExitY],BizzInfo[i][bExitZ]);
PlayerInfo[playerid][pInt] = BizzInfo[i][bInterior];
PlayerInfo[playerid][pLocal] = i+99;
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s hat %d$ bezahlt um das Unternehmen %d zu betreten", dood, BizzInfo[i][bEntranceCost], i);
printf("%s", string);
PayLog(string);
//PlayerInfo[playerid][pLocal] = i;
}
else
{
GameTextForPlayer(playerid, "~r~Du hast nicht genug Geld!", 5000, 1);
}
}
}
for(new i = 0; i < sizeof(SBizzInfo); i++)
{
if (PlayerToPoint(3, playerid,SBizzInfo[i][sbEntranceX], SBizzInfo[i][sbEntranceY], SBizzInfo[i][sbEntranceZ]))
{
if(PlayerInfo[playerid][pPbiskey] == i || GetPlayerMoney(playerid) >= SBizzInfo[i][sbEntranceCost])
{
if(PlayerInfo[playerid][pPbiskey] != i)
{
if(SBizzInfo[i][sbLocked] == 1)
{
GameTextForPlayer(playerid, "~r~Geschlossen!", 5000, 1);
return 1;
}
if(SBizzInfo[i][sbProducts] == 0)
{
GameTextForPlayer(playerid, "~r~Außerhalb der Zone", 5000, 1);
return 1;
}
if(i == 10)
{
PaintballPlayers ++;
PlayerPaintballing[playerid] = 1;
new rand = random(sizeof(PaintballSpawns));
SetPlayerPos(playerid, PaintballSpawns[rand][0], PaintballSpawns[rand][1], PaintballSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
}
else if(i == 11)
{
PlayerKarting[playerid] = 1;
SendClientMessage(playerid, TEAM_GROVE_COLOR, "Du kannst am Kart Race teilnehmen. Steig in ein Kart.");
}
else
{
return 1;
}
GivePlayerMoney(playerid,-SBizzInfo[i][sbEntranceCost]);
gSpentCash[playerid] = GetPlayerMoney(playerid);
SBizzInfo[i][sbProducts]--;
SBizzInfo[i][sbTill] += SBizzInfo[i][sbEntranceCost];
ExtortionSBiz(i, SBizzInfo[i][sbEntranceCost]);
new dood[MAX_PLAYER_NAME];
GetPlayerName(playerid, dood, sizeof(dood));
format(string, sizeof(string), "%s hat %d$ bezahlt um das Unternehmen %d zu betreten", dood, SBizzInfo[i][sbEntranceCost], i);
printf("%s", string);
PayLog(string);
OnPropUpdate();
}
}
else
{
GameTextForPlayer(playerid, "~r~Du hast nicht genug Geld!", 5000, 1);
}
}
}
if (PlayerToPoint(3.0, playerid,-2162.2554,-2385.9541,30.6250))
{
SetPlayerInterior(playerid,3);
SetPlayerPos(playerid,387.7978,173.8582,1008.3828);
GameTextForPlayer(playerid, "~w~Willkommen in der Stadthalle", 5000, 1);
PlayerInfo[playerid][pInt] = 3;
PlayerInfo[playerid][pLocal] = 241;
}
else if (PlayerToPoint(3.0, playerid,2695.6235,-1704.6960,11.8438))
{
GameTextForPlayer(playerid, "~w~Willkommen zu 8ball", 5000, 1);
SetPlayerInterior(playerid,7);
SetPlayerPos(playerid,-1404.5299,-259.0602,1043.6563);
}
else if (PlayerToPoint(8.0, playerid,-2111.5686,-443.9720,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen zu Dirt Track", 5000, 1);
SetPlayerInterior(playerid,4);
SetPlayerPos(playerid,-1443.0554,-581.1879,1055.0472);
}
else if (PlayerToPoint(3.0, playerid,-1605.4897,711.7740,13.8672)) //PD Eingang
{
SetPlayerInterior(playerid,6);
SetPlayerPos(playerid,246.9030,63.2616,1003.6406);
}
else if (PlayerToPoint(3.0, playerid,-2336.7227,-166.9267,35.5547))//BSW Eingang
{
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,363.4130,-74.5787,1001.5078);
}
else if (PlayerToPoint(8.0, playerid,-2080.3079,-406.0309,38.7344))
{
GameTextForPlayer(playerid, "~w~Willkommen zum Stunting Track", 5000, 1);
SetPlayerInterior(playerid,14);
SetPlayerPos(playerid,-1464.7732,1557.5533,1052.5313);
}
}
}
return 1;
} -
Hm geht aber ist jetzt auf Tab
welche definition ist den die eingabetatse? -
-
Also gibt es keine eingabetaste?
-
KEY_SECONDARY_ATTACK
das ist die enter taste.
-
Ah danke
-
-
breadfish.de
Hat das Thema geschlossen.