09.02.2011, 18:49
Somewhere too much or too little symbol}, but I do not know where? drop me a error. how to put things right?
Code:
if(!strcmp(cmdtext, "/cparduoti", true,10))
if(strcmp(cmdtext, "/cparduoti", true)==10)
{
if(IsNewTurgus(Coo[0],Coo[1]))
{
if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid])){
if(Carlist[playerid][Lock]==1)
{
SendClientMessage(playerid,BLUE,"* Jei nori parduoti masina, atrakink ja!");
return 1;
}
new kaina;
if(model == DINGHY) kaina = 5500;
else if(model == REEFER) kaina = 13500;
else if(model == TROPIC) kaina = 24500;
else if(model == SPEEDER) kaina = 15500;
else if(model == MARQUIS) kaina = 10500;
else if(model == CLUB) kaina = 14000;
else if(model == PHOENIX) kaina = 12000;
else if(model == SULTAN) kaina = 16000;
else if(model == JESTER) kaina = 17000;
else if(model == ELEGY) kaina = 20000;
else if(model == FLASH) kaina = 18000;
else if(model == URANUS) kaina = 18000;
else if(model == BANSHEE) kaina = 45000;
else if(model == TURISMO) kaina = 40000;
else if(model == BULLET) kaina = 35000;
else if(model == BUFFALO) kaina = 25000;
else if(model == SUPERGT) kaina = 20000;
else if(model == INFERNUS) kaina = 45000;
else if(model == REMINGTN) kaina = 13500;
else if(model == BLADE) kaina = 10500;
else if(model == SAVANNA) kaina = 14000;
else if(model == VOODOO) kaina = 11500;
else if(model == ADMIRAL) kaina = 1000;
else if(model == SUNRISE) kaina = 3000;
else if(model == CADRONA) kaina = 3100;
else if(model == BURRITO) kaina = 3000;
else if(model == SLAMVAN) kaina = 7000;
else if(model == NRG500) kaina = 14000;
else if(model == FCR900) kaina = 8500;
else if(model == PCJ600) kaina = 4500;
else if(model == BF400) kaina = 2500;
else if(model == TAMPA) kaina = 3500;
else if(model == MERIT) kaina = 5500;
else if(model == CAMPER) kaina = 4700;
else if(model == JOURNEY) kaina = 7000;
else if(model == REGINA) kaina = 4700;
else if(model == STALLION) kaina = 7700;
else if(model == 505) kaina = 9900;
else if(model == STRATUM) kaina = 5900;
else if(model == FELTZER) kaina = 5700;
else if(model == MOONBEAM) kaina = 4700;
else if(model == EMPEROR) kaina = 2990;
else if(model == PONY) kaina = 4700;
else if(model == COMET) kaina = 20700;
else if(model == QUAD) kaina = 8700;
else if(model == WAYFARER) kaina = 7600;
else if(model == ZR350) kaina = 21700;
else if(model == MANANA) kaina = 900;
else if(model == FORTUNE) kaina = 2700;
else if(model == RUMPO) kaina = 4200;
else return 1;
RemovePlayerFromVehicle(playerid);
GivePlayerMoneyA(playerid,kaina);
SendClientMessage(playerid,GREEN,"* Masina parduota!");
vehicleDB[Carlist[playerid][Carid]][owner_name]=-1;
SetVehicleParamsForAll(Carlist[playerid][Carid],0,0);
DestroyVehicle(Carlist[playerid][Carid]);
vehicleDB[Carlist[playerid][Carid]][gas]=Carlist[playerid][gas];
Carlist[playerid][Typ]=-1; Carlist[playerid][X]=0.0; Carlist[playerid][Y]=0.0; Carlist[playerid][Z]=0.0;
Carlist[playerid][Rotation]=0.0; Carlist[playerid][Status]=0; Carlist[playerid][Lock]=0; Carlist[playerid][Carid]=-1;
Carlist[playerid][Color1]=-1; Carlist[playerid][Color2]=-1; Carlist[playerid][mod1]=-1; Carlist[playerid][mod2]=-1;
Carlist[playerid][mod3]=-1; Carlist[playerid][mod4]=-1; Carlist[playerid][mod5]=-1; Carlist[playerid][mod6]=-1;
Carlist[playerid][mod7]=-1; Carlist[playerid][mod8]=-1; Carlist[playerid][mod9]=-1; Carlist[playerid][mod10]=-1;
Carlist[playerid][mod11]=-1; Carlist[playerid][mod12]=-1; Carlist[playerid][mod13]=-1; Carlist[playerid][mod14]=-1;
Carlist[playerid][mod15]=-1; Carlist[playerid][mod16]=-1; Carlist[playerid][mod17]=-1; Carlist[playerid][mod18]=-1; Carlist[playerid][Paintjob]=-1;
Carlist[playerid][gas]=-1;Carlist[playerid][numeris]=-1;
playerDB[playerid][pcar]=-1;
new dateiname[MAX_PLAYER_NAME+4];
new playername[MAX_PLAYER_NAME];
new var[256];
GetPlayerName(playerid, playername, sizeof(playername));
format(dateiname, sizeof(dateiname), "saves/vehicle/%s", playername);
new File: CarFile = fopen(dateiname, io_write);
format(var, 256, "AH_Typ=%i\n", Carlist[playerid][Typ] ); fwrite(CarFile, var);
format(var, 256, "AH_X=0.0\n"); fwrite(CarFile, var);
format(var, 256, "AH_Y=0.0\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Z=0.0\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Rot=0.0\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Status=0.0\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Lock=0.0\n"); fwrite(CarFile, var);
format(var, 256, "AH_Paintjob=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Color1=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Color2=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod1=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod2=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod3=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod4=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod5=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod6=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod7=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod8=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod9=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod10=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod11=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod12=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod13=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod14=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod15=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod16=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod17=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod18=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_gas=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_numeris=-1\n" ); fwrite(CarFile, var);
fclose(CarFile);
return 1;
}
Code:
if(!strcmp(cmdtext, "/cparduoti", true,10))
if(strcmp(cmdtext, "/cparduoti", true)==10)
{
if(IsNewTurgus(Coo[0],Coo[1]))
{
if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid])){
if(Carlist[playerid][Lock]==1)
{
SendClientMessage(playerid,BLUE,"* Jei nori parduoti masina, atrakink ja!");
return 1;
}
new kaina;
if(model == DINGHY) kaina = 5500;
else if(model == REEFER) kaina = 13500;
else if(model == TROPIC) kaina = 24500;
else if(model == SPEEDER) kaina = 15500;
else if(model == MARQUIS) kaina = 10500;
else if(model == CLUB) kaina = 14000;
else if(model == PHOENIX) kaina = 12000;
else if(model == SULTAN) kaina = 16000;
else if(model == JESTER) kaina = 17000;
else if(model == ELEGY) kaina = 20000;
else if(model == FLASH) kaina = 18000;
else if(model == URANUS) kaina = 18000;
else if(model == BANSHEE) kaina = 45000;
else if(model == TURISMO) kaina = 40000;
else if(model == BULLET) kaina = 35000;
else if(model == BUFFALO) kaina = 25000;
else if(model == SUPERGT) kaina = 20000;
else if(model == INFERNUS) kaina = 45000;
else if(model == REMINGTN) kaina = 13500;
else if(model == BLADE) kaina = 10500;
else if(model == SAVANNA) kaina = 14000;
else if(model == VOODOO) kaina = 11500;
else if(model == ADMIRAL) kaina = 1000;
else if(model == SUNRISE) kaina = 3000;
else if(model == CADRONA) kaina = 3100;
else if(model == BURRITO) kaina = 3000;
else if(model == SLAMVAN) kaina = 7000;
else if(model == NRG500) kaina = 14000;
else if(model == FCR900) kaina = 8500;
else if(model == PCJ600) kaina = 4500;
else if(model == BF400) kaina = 2500;
else if(model == TAMPA) kaina = 3500;
else if(model == MERIT) kaina = 5500;
else if(model == CAMPER) kaina = 4700;
else if(model == JOURNEY) kaina = 7000;
else if(model == REGINA) kaina = 4700;
else if(model == STALLION) kaina = 7700;
else if(model == 505) kaina = 9900;
else if(model == STRATUM) kaina = 5900;
else if(model == FELTZER) kaina = 5700;
else if(model == MOONBEAM) kaina = 4700;
else if(model == EMPEROR) kaina = 2990;
else if(model == PONY) kaina = 4700;
else if(model == COMET) kaina = 20700;
else if(model == QUAD) kaina = 8700;
else if(model == WAYFARER) kaina = 7600;
else if(model == ZR350) kaina = 21700;
else if(model == MANANA) kaina = 900;
else if(model == FORTUNE) kaina = 2700;
else if(model == RUMPO) kaina = 4200;
else return 1;
RemovePlayerFromVehicle(playerid);
GivePlayerMoneyA(playerid,kaina);
SendClientMessage(playerid,GREEN,"* Masina parduota!");
vehicleDB[Carlist[playerid][Carid]][owner_name]=-1;
SetVehicleParamsForAll(Carlist[playerid][Carid],0,0);
DestroyVehicle(Carlist[playerid][Carid]);
vehicleDB[Carlist[playerid][Carid]][gas]=Carlist[playerid][gas];
Carlist[playerid][Typ]=-1; Carlist[playerid][X]=0.0; Carlist[playerid][Y]=0.0; Carlist[playerid][Z]=0.0;
Carlist[playerid][Rotation]=0.0; Carlist[playerid][Status]=0; Carlist[playerid][Lock]=0; Carlist[playerid][Carid]=-1;
Carlist[playerid][Color1]=-1; Carlist[playerid][Color2]=-1; Carlist[playerid][mod1]=-1; Carlist[playerid][mod2]=-1;
Carlist[playerid][mod3]=-1; Carlist[playerid][mod4]=-1; Carlist[playerid][mod5]=-1; Carlist[playerid][mod6]=-1;
Carlist[playerid][mod7]=-1; Carlist[playerid][mod8]=-1; Carlist[playerid][mod9]=-1; Carlist[playerid][mod10]=-1;
Carlist[playerid][mod11]=-1; Carlist[playerid][mod12]=-1; Carlist[playerid][mod13]=-1; Carlist[playerid][mod14]=-1;
Carlist[playerid][mod15]=-1; Carlist[playerid][mod16]=-1; Carlist[playerid][mod17]=-1; Carlist[playerid][mod18]=-1; Carlist[playerid][Paintjob]=-1;
Carlist[playerid][gas]=-1;Carlist[playerid][numeris]=-1;
playerDB[playerid][pcar]=-1;
new dateiname[MAX_PLAYER_NAME+4];
new playername[MAX_PLAYER_NAME];
new var[256];
GetPlayerName(playerid, playername, sizeof(playername));
format(dateiname, sizeof(dateiname), "saves/vehicle/%s", playername);
new File: CarFile = fopen(dateiname, io_write);
format(var, 256, "AH_Typ=%i\n", Carlist[playerid][Typ] ); fwrite(CarFile, var);
format(var, 256, "AH_X=0.0\n"); fwrite(CarFile, var);
format(var, 256, "AH_Y=0.0\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Z=0.0\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Rot=0.0\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Status=0.0\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Lock=0.0\n"); fwrite(CarFile, var);
format(var, 256, "AH_Paintjob=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Color1=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_Color2=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod1=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod2=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod3=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod4=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod5=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod6=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod7=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod8=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod9=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod10=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod11=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod12=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod13=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod14=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod15=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod16=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod17=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_mod18=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_gas=-1\n" ); fwrite(CarFile, var);
format(var, 256, "AH_numeris=-1\n" ); fwrite(CarFile, var);
fclose(CarFile);
return 1;
}