nein die anderen wie Kekse burger zigaretten,.... haben das genauso, habs kopiert. listitem ist nicht definiert
Kamera für 24/7
- Tomsen
- 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
-
-
D:\Spiele\Rockstar Games\San Andreas\GLR\gamemodes\GLR.pwn(28048) : error 029: invalid expression, assumed zero
D:\Spiele\Rockstar Games\San Andreas\GLR\gamemodes\GLR.pwn(28048) : warning 215: expression has no effect
D:\Spiele\Rockstar Games\San Andreas\GLR\gamemodes\GLR.pwn(28048) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase2 Errors.
In der Zeile:
else if (item == 11 && GetPlayerMoney(playerid) >= 199)
Du suchst in der falschen Zeile. (Der Fehler wird durch das was davor ist ausgeloest.)
Du kannst keine Befehle zwischen den if-else if Abfragen schreiben.
if( variable == 1 )
{ dostuff(); }
domorestuff();
else if ( variable == 2 ){} -
//edit: Klassischer Fehler. Habs hinbekommen, allerdings, bekomm ich immer wenn ich ne camera von server bekomme nen bann wegen waffenhack. Ich hab ein GF, wo kann ich bearbeiten das man für eine Kamera keine Bann bekommt?!
Lg byBSE
-
if(strcmp(cmd, "/buy", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (!IsPlayerInRangeOfPoint(playerid,100.0,-30.875, -88.9609, 1004.53))//centerpoint 24-7
{
SendClientMessage(playerid, COLOR_GRAD2, " Du bist nicht im 24-7 !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "BENUTZUNG: /buy [Itemnummer]");
SendClientMessage(playerid, COLOR_GREEN, "_________ 24-7 _________");
SendClientMessage(playerid, COLOR_GRAD1, "| 1: Telefon $100 2: Karte auffüllen $5");
SendClientMessage(playerid, COLOR_GRAD2, "| 3: Telefon Buch $50 4: Würfel $5");
SendClientMessage(playerid, COLOR_GRAD4, "| 5: Kondom $10 6: CD-Player $20");
SendClientMessage(playerid, COLOR_GRAD5, "| 7: Chicken $3 8: Hamburger $3 ");
SendClientMessage(playerid, COLOR_GRAD5, "| 9: Pizza $3 10: Zigaretten 10$");
SendClientMessage(playerid, COLOR_GRAD5, "| 10: Kammera XD"); //hier ist neu ;)
return 1;
}
new item = strval(tmp);
if (item == 1 && GetPlayerMoney(playerid) > 100)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 90 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 90 - price;
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,- payout);
SBizzInfo[9][sbTill] += payout;
ExtortionSBiz(9, payout);
}
else
{
format(string, sizeof(string), "~r~-$%d", 100);
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,-100);
SBizzInfo[9][sbTill] += 100;
ExtortionSBiz(9, 100);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new randphone = 1000 + random(8999);//minimum 1000 max 9999
PlayerInfo[playerid][pPnumber] = randphone;
format(string, sizeof(string), " Telefon gekauft! Deine Telefonnummer lautet %d", randphone);
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_GRAD5, "Du kannst sie jederzeit mit /stats nachgucken.");
SendClientMessage(playerid, COLOR_WHITE, "HILFE: Du kannst /hilfe eingeben um die Befehle zu sehen.");
return 1;
}
else if (item == 2 && GetPlayerMoney(playerid) > 5)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 1 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 1 - price;
GivePlayerMoney(playerid,- payout);
SBizzInfo[9][sbTill] += payout;
ExtortionSBiz(9, payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid,-5);
SBizzInfo[9][sbTill] += 5;
ExtortionSBiz(9, 5);
format(string, sizeof(string), "~r~-$%d", 5);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
new prize;
new symb1[32]; new symb2[32]; new symb3[32];
new randcard1 = random(10);//minimum 1000 max 9999
new randcard2 = random(10);//minimum 1000 max 9999
new randcard3 = random(10);//minimum 1000 max 9999
if(randcard1 >= 5)
{
format(symb1, sizeof(symb1), "~b~]");
randcard1 = 1;
}
else if(randcard1 <= 4 && randcard1 >= 2)
{
format(symb1, sizeof(symb1), "~g~]");
randcard1 = 2;
}
else if(randcard1 < 2)
{
format(symb1, sizeof(symb1), "~y~]");
randcard1 = 3;
}
if(randcard2 >= 5)
{
format(symb2, sizeof(symb2), "~b~]");
randcard2 = 1;
}
else if(randcard2 <= 4 && randcard2 >= 2)
{
format(symb2, sizeof(symb2), "~g~]");
randcard2 = 2;
}
else if(randcard2 < 2)
{
format(symb2, sizeof(symb2), "~y~]");
randcard2 = 3;
}
if(randcard3 >= 5)
{
format(symb3, sizeof(symb3), "~b~]");
randcard3 = 1;
}
else if(randcard3 <= 4 && randcard3 >= 2)
{
format(symb3, sizeof(symb3), "~g~]");
randcard3 = 2;
}
else if(randcard3 < 2)
{
format(symb3, sizeof(symb3), "~y~]");
randcard3 = 3;
}
if(randcard1 == randcard2 && randcard1 == randcard3)
{
if(randcard1 > 5)
{
prize = 100;
}
if(randcard1 <= 4 && randcard1 >= 2)
{
prize = 50;
}
if(randcard1 < 2)
{
prize = 10;
}
GivePlayerMoney(playerid,prize);
SBizzInfo[9][sbTill] -= prize;
ExtortionSBiz(9, prize);
format(string, sizeof(string), "%s %s %s ~n~~n~~w~~g~$%d",symb1,symb2,symb3, prize);
}
else
{
format(string, sizeof(string), "%s %s %s ~n~~n~~w~~r~$0",symb1,symb2,symb3);
}
GameTextForPlayer(playerid, string, 3000, 3);
return 1;
}
else if (item == 3 && GetPlayerMoney(playerid) > 40)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 40 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 40 - price;
GivePlayerMoney(playerid,- payout);
SBizzInfo[9][sbTill] += payout;
ExtortionSBiz(9, payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid,-50);
SBizzInfo[9][sbTill] += 50;
ExtortionSBiz(9, 50);
format(string, sizeof(string), "~r~-$%d", 50);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerInfo[playerid][pPhoneBook] = 1;
format(string, sizeof(string), " Telefonbuch gekauft! Du kannst damit die Telefonnummern von anderen Spielern nachgucken.");
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_WHITE, "HILFE: Gib /number [id] ein um die Nummer zu sehen.");
return 1;
}
else if (item == 4 && GetPlayerMoney(playerid) > 5)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 1 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 1 - price;
GivePlayerMoney(playerid,- payout);
SBizzInfo[9][sbTill] += payout;
ExtortionSBiz(9, payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid,-5);
SBizzInfo[9][sbTill] += 5;
ExtortionSBiz(9, 5);
format(string, sizeof(string), "~r~-$%d", 5);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
gDice[playerid] = 1;
format(string, sizeof(string), " Würfel gekauft.");
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_WHITE, "HILFE: Gib /dice um den Würfel zu werfen. ");
return 1;
}
else if (item == 5 && GetPlayerMoney(playerid) > 8)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 50 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 50 - price;
GivePlayerMoney(playerid,- payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid,-10);
format(string, sizeof(string), "~r~-$%d", 10);
GameTextForPlayer(playerid, string, 5000, 1);
}
Condom[playerid] ++;
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Kondom Gekauft.");
SendClientMessage(playerid, COLOR_GRAD4, string);
return 1;
}
else if (item == 6 && GetPlayerMoney(playerid) > 50)
{
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 25 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 2500 - price;
GivePlayerMoney(playerid, - payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid, - 20);
format(string, sizeof(string), "~r~-$%d", 20);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "CD-Player gekauft.");
SendClientMessage(playerid, COLOR_GRAD4, string);
SendClientMessage(playerid, COLOR_WHITE, "Hilfe: Tipp: /music");
PlayerInfo[playerid][pCDPlayer] = 1;
return 1;
}
else if (item == 7 && GetPlayerMoney(playerid) > 3)
{
if(Groceries[playerid][pChickens] >= 3)
{
SendClientMessage(playerid, COLOR_GREY, " Du hast zu viele Chicken, Brate zuerst ein paar !");
return 1;
}
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 3 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 3 - price;
GivePlayerMoney(playerid, - payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid, - 3);
format(string, sizeof(string), "~r~-$%d", 3);
GameTextForPlayer(playerid, string, 5000, 1);
}
GivePlayerMoney(playerid, - 3);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Chicken gekauft.");
SendClientMessage(playerid, COLOR_GRAD4, string);
format(string, sizeof(string), "~r~-$%d", 3);
GameTextForPlayer(playerid, string, 5000, 1);
new rand = random(15);
Groceries[playerid][pChickens] += 1;
Groceries[playerid][pChicken] += rand;
return 1;
}
else if (item == 8 && GetPlayerMoney(playerid) > 3)
{
if(Groceries[playerid][pHamburgers] >= 3)
{
SendClientMessage(playerid, COLOR_GREY, " Du hast zu viele Hamburger, Koche zuerst ein paar !");
return 1;
}
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 1 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 1 - price;
GivePlayerMoney(playerid, - payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid, -3);
format(string, sizeof(string), "~r~-$%d", 3);
GameTextForPlayer(playerid, string, 5000, 1);
}
GivePlayerMoney(playerid, - 3);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Hamburger gekauft.");
SendClientMessage(playerid, COLOR_GRAD4, string);
format(string, sizeof(string), "~r~-$%d", 3);
GameTextForPlayer(playerid, string, 5000, 1);
new rand = random(15);
Groceries[playerid][pHamburgers] += 1;
Groceries[playerid][pHamburger] += rand;
return 1;
}
else if (item == 9 && GetPlayerMoney(playerid) > 10)
{
if(Groceries[playerid][pPizzas] >= 3)
{
SendClientMessage(playerid, COLOR_GREY, " Du hast zu viele Pizzen, Backe zuerst ein paar !");
return 1;
}
if(PlayerInfo[playerid][pTraderPerk] > 0)
{
new skill = 5 / 100;
new price = (skill)*(PlayerInfo[playerid][pTraderPerk]);
new payout = 5 - price;
GivePlayerMoney(playerid, - payout);
format(string, sizeof(string), "~r~-$%d", payout);
GameTextForPlayer(playerid, string, 5000, 1);
}
else
{
GivePlayerMoney(playerid, -3);
format(string, sizeof(string), "~r~-$%d", 3);
GameTextForPlayer(playerid, string, 5000, 1);
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Gefrorene Pizza Gekauft.");
SendClientMessage(playerid, COLOR_GRAD4, string);
new rand = random(15);
Groceries[playerid][pPizzas] += 1;
Groceries[playerid][pPizza] += rand;
return 1;
}
else if (item == 10 && GetPlayerMoney(playerid) > 10)
{
GivePlayerMoney(playerid, -10);
format(string, sizeof(string), "~r~-$%d", 10);
GameTextForPlayer(playerid, string, 5000, 1);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Schachtel Zigaretten Gekauft.");
SendClientMessage(playerid, COLOR_GRAD4, string);
PlayerInfo[playerid][pZig] = 5;
return 1;
}
else if (item == 11 && GetPlayerMoney(playerid) > 11)// hier ist neu
{
GivePlayerMoney(playerid, -10);
format(string, sizeof(string), "~r~-$%d", 10);
GameTextForPlayer(playerid, string, 5000, 1);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "Kammeragekauft :D");
SendClientMessage(playerid, COLOR_GRAD4, string);
GivePlayerWeapon(playerid, 43, 900);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Du hast nicht genug Geld Dafür!");
}
}
return 1;
} -
new kamera[MAX_PLAYERS];
Unter dem Befehl /kamera
if(kamera == 1)
{
...So musst du das machen
-
Ich sags gern nochmal:
Es geht mittlerweile, allerdings bekomme ich nen Bann wen ich irgentwie ne Kamera auf dem Script bekomme.
Leider finde ich nicht die stelle wo man zb die waffenid 43 für die Kamera rausnimmt, das man halt nichtmehr gebannt wird
Lg byBSE
-
Ich sags gern nochmal:
Es geht mittlerweile, allerdings bekomme ich nen Bann wen ich irgentwie ne Kamera auf dem Script bekomme.
Leider finde ich nicht die stelle wo man zb die waffenid 43 für die Kamera rausnimmt, das man halt nichtmehr gebannt wird
Lg byBSE
Musst du mal in der M_Bot.inc schauen falls du diese benutzt.
-
breadfish.de
Hat das Thema geschlossen.