Ich habe immernoch nicht verstanden wo da der fehler liegen soll ...
Beiträge von [ATC]eRaZoR
-
-
xD wie shclecht ist das denn xDDD
sry aber das ist wirklisch schlecht, ich könnte es nciht besser, aber das ist schlecht 0/10
//EDIT//
Juhuu bin Profi :D:D
-
Was soll das denn?
Zitat von "RBOY"Hallo Brotfischer
???? was ist das denn
//EDIT//
naja, er hat sich ja entschuldigt
-
hm..
komisch,
da ist doch kein fehler drinne
-
achso,
sry wusste ich nicht^^
versuch mal:
vehicleid
-
versuch mal playerid
hats denn geklappt? -
wenn das nciht gehtversuchs mal so:
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == OttoMenu)
{
switch(row)
{
case 0: //Bullet
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 65000)
{
new c[20];
vehicleid10 = CreateVehicle(541,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++)
{
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -65000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 1: //Banshee
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 80000)
{
new c[20];
vehicleid10 = CreateVehicle(429,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++){
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -80000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 2: //Infernur
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 115000)
{
new c[20];
vehicleid10 = CreateVehicle(411,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++)
{
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -115000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
}
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 3: //Cheetah
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 135000)
{
new c[20];
vehicleid10 = CreateVehicle(415,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++)
{
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -135000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
}
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 4: //Turismo
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 140000)
{
new c[20];
vehicleid10 = CreateVehicle(451,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++)
{
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -140000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
}
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 5: //Super GT
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 150000)
{
new c[20];
vehicleid10 = CreateVehicle(506,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++)
{
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -150000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
}
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
return 1;
}wie meinst du cdas?^^
-
//EDIT//
ich machs jezz^^
versuchs mal so..
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == OttoMenu)
{
switch(row)
{
case 0: //Bullet
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 65000)
{
new c[20];
vehicleid10 = CreateVehicle(541,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++)
{
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -65000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 1: //Banshee
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 80000)
{
new c[20];
vehicleid10 = CreateVehicle(429,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++){
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -80000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 2: //Infernur
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 115000)
{
new c[20];
vehicleid10 = CreateVehicle(411,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++)
{
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -115000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
}
}
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 3: //Cheetah
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 135000)
{
new c[20];
vehicleid10 = CreateVehicle(415,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++)
{
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -135000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
}
}
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 4: //Turismo
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 140000)
{
new c[20];
vehicleid10 = CreateVehicle(451,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++)
{
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -140000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
}
}
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 5: //Super GT
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 150000)
{
new c[20];
vehicleid10 = CreateVehicle(506,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++)
{
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c))
{
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -150000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
}
}
}
}
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
return 1;
} -
public OnPlayerSelectedMenuRow(playerid, row)
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == OttoMenu)
{
switch(row)
{
case 0: //Bullet
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 65000)
{
new c[20];
vehicleid10 = CreateVehicle(541,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++){
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c)){
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -65000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 1: //Banshee
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 80000)
{
new c[20];
vehicleid10 = CreateVehicle(429,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++){
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c)){
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -80000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 2: //Infernur
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 115000)
{
new c[20];
vehicleid10 = CreateVehicle(411,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++){
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c)){
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -115000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 3: //Cheetah
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 135000)
{
new c[20];
vehicleid10 = CreateVehicle(415,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++){
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c)){
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -135000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 4: //Turismo
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 140000)
{
new c[20];
vehicleid10 = CreateVehicle(451,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++){
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c)){
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -140000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}
case 5: //Super GT
{
if (IsPlayerConnected(playerid))
{
if (GetPlayerMoney(playerid) >= 150000)
{
new c[20];
vehicleid10 = CreateVehicle(506,-2218.0332,2426.9214,1.7144,135.2682,-1,-1,-1);
for(new i=0; i<1000; i++){
format(c,sizeof(c),"cars/%d.ini",i);
if(!dini_Exists(c)){
dini_Create(c);
dini_IntSet(c,"id",id);
dini_FloatSet(c,"x",-2218.0332);
dini_FloatSet(c,"y",2426.9214);
dini_FloatSet(c,"z",1.7144);
dini_FloatSet(c,"angel",135.2682);
dini_FloatSet(c,"health",1000.0000);
dini_IntSet(c,"cid",-1);
dini_IntSet(c,"cid2",-1);
dini_Set(c,"besitzer",name);
dini_IntSet(c,name,2);
dini_IntSet(c,"benzin",maxbenzin[id]-(maxbenzin[id]/5));
dini_Set(c, "plate", "OttoCars");
SetVehicleNumberPlate(vehicleid10, "OttoCars");
format(string,sizeof(string),"Vehicle (ID: %d) Gekauft",id);
SendClientMessage(playerid,green,string);
format(vehicle[vehicleid10],20,"%s",c);
GivePlayerMoney(playerid, -150000);
SendClientMessage(playerid, INFORMATION, "Du hast ein Auto gekauft! Hole es ab!");
}
else
{
SendClientMessage(playerid, ERROR, "Du hast nicht genügend Geld!");
}}und dann noch die klammern
-
richtig.
aber wenn er meint wieder zu cheaten wird er wieder gekickt
-
ich dachte immer < das ist größer und > kleiner^^
-
Hallo.
ich habe ien anti healthack gemacht, nur wenn ich connecte werde ich gekickt..
public HealthH()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new Float:health;
GetPlayerHealth(i, health);
if(health <= 600)
{
new pname[200];
new string[200];
GetPlayerName(i, pname, sizeof(pname));
format(string, sizeof(string), "-=[ANTICHEAT]=- %s wurde wegen HealthHack gekickt!", pname);
SendClientMessageToAll(COLOR_RED,string);
Kick(i);
return 1;
}
}
return 1;
}warum ??
-
format(LastText[playerid],sizeof LastText[playerid],"%s",text);
wegen dieserzeile bekomme ich 5 errors, und wenn ich sie weg mache, und dann spame passiert nichts...
-
if (strcmp("/free", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 0)
{if (GetPlayerState(playerid) == 2)
{
new tmpcar = GetPlayerVehicleID(playerid);
SetVehiclePos(tmpcar, 1958.3783, 1343.1572, 15.3746);
TelePos[playerid][0] = 0.0;TelePos[playerid][1] = 0.0;
}
else
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
}
SendClientMessage(playerid, COLOR_SEAGREEN, " Du bist nun bei Free !");
SetPlayerInterior(playerid,0);
PlayerInfo[playerid][pInt] = 0;
}
else
{
SendClientMessage(playerid, COLOR_RED, " Nicht für Dich!");
}
}
return 1;
}
}kann sein das ich mich verzählt habe mit den klammern wenns nciht geht dann sag bescheid^^
-
Super Hilfe..
"Objecktsteamer reinhauen und gut ist"
hilft wirklisch sehr, vllt noch n ling und ne erklährung wie es geht.. -
Das ist bei manschen Servern so, hatte ich auch mal. seiddem ich cnihtmehr auf dem server spiele ist es nichtmehr aufgetreten.
oder deine teste klemmt manschmal
-
Wenn ich das richtig verstehe, ist das ein Adminscript oder?
such dir doh andere gutez.b meins..
Admin Script -
Hast du orgentwo
SetPlayerMoney(playerid, 0);das stehen, vllt liegt es ja daran..
-
OnGameModeInit
so müsste es heißen (wenn ich mich nicht schon wieder verschrieben habe.)
-
dann mach deine sachen noch vor dem
return 1;
}rein