[Help] I don't know whats wrong with this...
#1

Well, I have this car system, and its giving me some bugs.... These are the 2 errors:

C:\Documents and Settings\Diego\Desktop\GodFather\gamemodes\daorp.p wn(3485) : warning 209: function "BuyingVeh" should return a value
C:\Documents and Settings\Diego\Desktop\GodFather\gamemodes\daorp.p wn(3486) : error 054: unmatched closing brace ("}")

And these are the lines:

public BuyingVeh(playerid)
{
new playername[MAX_PLAYER_NAME];
new string[256];
new rand = random(sizeof(gCarSystemSpawns));
if(!strcmp(PlayerVehicle[playerid][pVeh1], "None", true))
{
new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
GetPlayerName(playerid, playername, sizeof(playername));
strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
VehicleInfo[carid][vOwned] = 1;
format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
VehicleInfo[carid][vModel] = pCar[playerid];
VehicleInfo[carid][vColorOne] = pColorS[playerid];
VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
VehicleInfo[carid][vComponent0]=0;
VehicleInfo[carid][vComponent1]=0;
VehicleInfo[carid][vComponent2]=0;
VehicleInfo[carid][vComponent3]=0;
VehicleInfo[carid][vComponent4]=0;
VehicleInfo[carid][vComponent5]=0;
VehicleInfo[carid][vComponent6]=0;
VehicleInfo[carid][vComponent7]=0;
VehicleInfo[carid][vComponent8]=0;
VehicleInfo[carid][vComponent9]=0;
VehicleInfo[carid][vComponent10]=0;
VehicleInfo[carid][vComponent11]=0;
VehicleInfo[carid][vComponent12]=0;
VehicleInfo[carid][vComponent13]=0;
VehicleInfo[carid][vPaintJob]=3;
VehicleInfo[carid][vLock] = 0;
VehicleInfo[carid][vLockBuyed] = 0;
new randkey = 10000 + random(89999);//minimum 1000 max 9999 //giving one at the start
VehicleInfo[carid][vKey] = randkey;
if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
{//boat
VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
}
else if(pCar[playerid] == 487)//heli
{
VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
}
else
{
VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
}
strmid(PlayerVehicle[playerid][pVeh1], string, 0, strlen(string), 255);
new str[256], plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
dini_Set(str, "Vehicle1", PlayerVehicle[playerid][pVeh1]);
SaveVehicles(playerid, carid);
format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
printf(string);
format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use it", VehicleNames[GetVehicleModel(carid)-400]);
GameTextForPlayer(playerid, string, 8000, 5);
GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
DestroyVehicle(carid);
//veh1[playerid] = 999;
}
else if(!strcmp(PlayerVehicle[playerid][pVeh2], "None", true))
{
new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
GetPlayerName(playerid, playername, sizeof(playername));
strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
VehicleInfo[carid][vOwned] = 1;
format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
VehicleInfo[carid][vModel] = pCar[playerid];
VehicleInfo[carid][vColorOne] = pColorS[playerid];
VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
VehicleInfo[carid][vComponent0]=0;
VehicleInfo[carid][vComponent1]=0;
VehicleInfo[carid][vComponent2]=0;
VehicleInfo[carid][vComponent3]=0;
VehicleInfo[carid][vComponent4]=0;
VehicleInfo[carid][vComponent5]=0;
VehicleInfo[carid][vComponent6]=0;
VehicleInfo[carid][vComponent7]=0;
VehicleInfo[carid][vComponent8]=0;
VehicleInfo[carid][vComponent9]=0;
VehicleInfo[carid][vComponent10]=0;
VehicleInfo[carid][vComponent11]=0;
VehicleInfo[carid][vComponent12]=0;
VehicleInfo[carid][vComponent13]=0;
VehicleInfo[carid][vPaintJob]=3;
VehicleInfo[carid][vLock] = 0;
VehicleInfo[carid][vLockBuyed] = 0;
if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
{//boat
VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
}
else if(pCar[playerid] == 487)//heli
{
VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
}
else
{
VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
}
strmid(PlayerVehicle[playerid][pVeh2], string, 0, strlen(string), 255);
new str[256], plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
dini_Set(str, "Vehicle2", PlayerVehicle[playerid][pVeh2]);
SaveVehicles(playerid, carid);
format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
printf(string);
format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use it", VehicleNames[GetVehicleModel(carid)-400]);
GameTextForPlayer(playerid, string, 8000, 5);
GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
DestroyVehicle(carid);
//veh2[playerid] = 999;
}
else if(!strcmp(PlayerVehicle[playerid][pVeh3], "None", true))
{
new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
GetPlayerName(playerid, playername, sizeof(playername));
strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
VehicleInfo[carid][vOwned] = 1;
format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
VehicleInfo[carid][vModel] = pCar[playerid];
VehicleInfo[carid][vColorOne] = pColorS[playerid];
VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
VehicleInfo[carid][vComponent0]=0;
VehicleInfo[carid][vComponent1]=0;
VehicleInfo[carid][vComponent2]=0;
VehicleInfo[carid][vComponent3]=0;
VehicleInfo[carid][vComponent4]=0;
VehicleInfo[carid][vComponent5]=0;
VehicleInfo[carid][vComponent6]=0;
VehicleInfo[carid][vComponent7]=0;
VehicleInfo[carid][vComponent8]=0;
VehicleInfo[carid][vComponent9]=0;
VehicleInfo[carid][vComponent10]=0;
VehicleInfo[carid][vComponent11]=0;
VehicleInfo[carid][vComponent12]=0;
VehicleInfo[carid][vComponent13]=0;
VehicleInfo[carid][vPaintJob]=3;
VehicleInfo[carid][vLock] = 0;
VehicleInfo[carid][vLockBuyed] = 0;
if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
{//boat
VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
}
else if(pCar[playerid] == 487)//heli
{
VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
}
else
{
VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
}
strmid(PlayerVehicle[playerid][pVeh3], string, 0, strlen(string), 255);
new str[256], plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
dini_Set(str, "Vehicle3", PlayerVehicle[playerid][pVeh3]);
SaveVehicles(playerid, carid);
format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
printf(string);
format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use /v spawn and park it", VehicleNames[GetVehicleModel(carid)-400]);
GameTextForPlayer(playerid, string, 8000, 5);
GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
DestroyVehicle(carid);
//veh3[playerid] = 999;
}
else if(!strcmp(PlayerVehicle[playerid][pVeh4], "None", true))
{
new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
GetPlayerName(playerid, playername, sizeof(playername));
strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
VehicleInfo[carid][vOwned] = 1;
format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
VehicleInfo[carid][vModel] = pCar[playerid];
VehicleInfo[carid][vColorOne] = pColorS[playerid];
VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
VehicleInfo[carid][vComponent0]=0;
VehicleInfo[carid][vComponent1]=0;
VehicleInfo[carid][vComponent2]=0;
VehicleInfo[carid][vComponent3]=0;
VehicleInfo[carid][vComponent4]=0;
VehicleInfo[carid][vComponent5]=0;
VehicleInfo[carid][vComponent6]=0;
VehicleInfo[carid][vComponent7]=0;
VehicleInfo[carid][vComponent8]=0;
VehicleInfo[carid][vComponent9]=0;
VehicleInfo[carid][vComponent10]=0;
VehicleInfo[carid][vComponent11]=0;
VehicleInfo[carid][vComponent12]=0;
VehicleInfo[carid][vComponent13]=0;
VehicleInfo[carid][vPaintJob]=3;
VehicleInfo[carid][vLock] = 0;
VehicleInfo[carid][vLockBuyed] = 0;
if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
{//boat
VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
}
else if(pCar[playerid] == 487)//heli
{
VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
}
else
{
VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
}
strmid(PlayerVehicle[playerid][pVeh4], string, 0, strlen(string), 255);
new str[256], plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
dini_Set(str, "Vehicle4", PlayerVehicle[playerid][pVeh4]);
SaveVehicles(playerid, carid);
format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
printf(string);
format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use /v spawn and park it", VehicleNames[GetVehicleModel(carid)-400]);
GameTextForPlayer(playerid, string, 8000, 5);
GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
DestroyVehicle(carid);
//veh4[playerid] = 999;
}
else if(!strcmp(PlayerVehicle[playerid][pVeh5], "None", true))
{
new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
GetPlayerName(playerid, playername, sizeof(playername));
strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
VehicleInfo[carid][vOwned] = 1;
format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
VehicleInfo[carid][vModel] = pCar[playerid];
VehicleInfo[carid][vColorOne] = pColorS[playerid];
VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
VehicleInfo[carid][vComponent0]=0;
VehicleInfo[carid][vComponent1]=0;
VehicleInfo[carid][vComponent2]=0;
VehicleInfo[carid][vComponent3]=0;
VehicleInfo[carid][vComponent4]=0;
VehicleInfo[carid][vComponent5]=0;
VehicleInfo[carid][vComponent6]=0;
VehicleInfo[carid][vComponent7]=0;
VehicleInfo[carid][vComponent8]=0;
VehicleInfo[carid][vComponent9]=0;
VehicleInfo[carid][vComponent10]=0;
VehicleInfo[carid][vComponent11]=0;
VehicleInfo[carid][vComponent12]=0;
VehicleInfo[carid][vComponent13]=0;
VehicleInfo[carid][vPaintJob]=3;
VehicleInfo[carid][vLock] = 0;
VehicleInfo[carid][vLockBuyed] = 0;
if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
{//boat
VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
}
else if(pCar[playerid] == 487)//heli
{
VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
}
else
{
VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
}
strmid(PlayerVehicle[playerid][pVeh5], string, 0, strlen(string), 255);
new str[256], plname[MAX_PLAYER_NAME];
GetPlayerName(playerid, plname, sizeof(plname));
format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
dini_Set(str, "Vehicle5", PlayerVehicle[playerid][pVeh5]);
SaveVehicles(playerid, carid);
format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
printf(string);
format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use /v spawn and park it", VehicleNames[GetVehicleModel(carid)-400]);
GameTextForPlayer(playerid, string, 8000, 5);
GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
DestroyVehicle(carid);
//veh5[playerid] = 999;
return 1;
}
else
{
SendClientMessage(playerid, COLOR_LIGHTRED, "You already own 5 vehicles !");
return 1;
}
} (3485)
} (3486)
}
}

Please help me, i dont know what is wrong.
Reply
#2

} (3485)
return 1;
} (3486)


but i don't know the second error...
Reply
#3

pawn Код:
public BuyingVeh(playerid)
{
  new playername[MAX_PLAYER_NAME];
  new string[256];
  new rand = random(sizeof(gCarSystemSpawns));
  if(!strcmp(PlayerVehicle[playerid][pVeh1], "None", true))
  {
   new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
   GetPlayerName(playerid, playername, sizeof(playername));
   strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
   VehicleInfo[carid][vOwned] = 1;
   format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
   strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
   VehicleInfo[carid][vModel] = pCar[playerid];
   VehicleInfo[carid][vColorOne] = pColorS[playerid];
   VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
   VehicleInfo[carid][vComponent0]=0;
   VehicleInfo[carid][vComponent1]=0;
   VehicleInfo[carid][vComponent2]=0;
   VehicleInfo[carid][vComponent3]=0;
   VehicleInfo[carid][vComponent4]=0;
   VehicleInfo[carid][vComponent5]=0;
   VehicleInfo[carid][vComponent6]=0;
   VehicleInfo[carid][vComponent7]=0;
   VehicleInfo[carid][vComponent8]=0;
   VehicleInfo[carid][vComponent9]=0;
   VehicleInfo[carid][vComponent10]=0;
   VehicleInfo[carid][vComponent11]=0;
   VehicleInfo[carid][vComponent12]=0;
   VehicleInfo[carid][vComponent13]=0;
   VehicleInfo[carid][vPaintJob]=3;
   VehicleInfo[carid][vLock] = 0;
   VehicleInfo[carid][vLockBuyed] = 0;
   new randkey = 10000 + random(89999);//minimum 1000 max 9999 //giving one at the start
   VehicleInfo[carid][vKey] = randkey;
   if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
   {//boat
     VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
     VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
     VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
     VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
   }
   else if(pCar[playerid] == 487)//heli
   {
      VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
     VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
     VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
     VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
   }
   else
   {
     VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
     VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
     VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
     VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
   }
   strmid(PlayerVehicle[playerid][pVeh1], string, 0, strlen(string), 255);
   new str[256], plname[MAX_PLAYER_NAME];
   GetPlayerName(playerid, plname, sizeof(plname));
   format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
   dini_Set(str, "Vehicle1", PlayerVehicle[playerid][pVeh1]);
   SaveVehicles(playerid, carid);
   format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
   printf(string);
   format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use it", VehicleNames[GetVehicleModel(carid)-400]);
   GameTextForPlayer(playerid, string, 8000, 5);
   GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
   DestroyVehicle(carid);
   //veh1[playerid] = 999;
   }
   else if(!strcmp(PlayerVehicle[playerid][pVeh2], "None", true))
   {
      new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
      GetPlayerName(playerid, playername, sizeof(playername));
     strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
     VehicleInfo[carid][vOwned] = 1;
     format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
     strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
     VehicleInfo[carid][vModel] = pCar[playerid];
     VehicleInfo[carid][vColorOne] = pColorS[playerid];
     VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
     VehicleInfo[carid][vComponent0]=0;
     VehicleInfo[carid][vComponent1]=0;
     VehicleInfo[carid][vComponent2]=0;
     VehicleInfo[carid][vComponent3]=0;
     VehicleInfo[carid][vComponent4]=0;
     VehicleInfo[carid][vComponent5]=0;
     VehicleInfo[carid][vComponent6]=0;
     VehicleInfo[carid][vComponent7]=0;
     VehicleInfo[carid][vComponent8]=0;
     VehicleInfo[carid][vComponent9]=0;
     VehicleInfo[carid][vComponent10]=0;
     VehicleInfo[carid][vComponent11]=0;
     VehicleInfo[carid][vComponent12]=0;
     VehicleInfo[carid][vComponent13]=0;
     VehicleInfo[carid][vPaintJob]=3;
     VehicleInfo[carid][vLock] = 0;
     VehicleInfo[carid][vLockBuyed] = 0;
     if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
     {//boat
      VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
      VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
      VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
      VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
     }
     else if(pCar[playerid] == 487)//heli
      {
       VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
      VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
      VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
      VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
     }
     else
     {
      VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
      VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
      VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
      VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
     }
     strmid(PlayerVehicle[playerid][pVeh2], string, 0, strlen(string), 255);
     new str[256], plname[MAX_PLAYER_NAME];
     GetPlayerName(playerid, plname, sizeof(plname));
     format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
     dini_Set(str, "Vehicle2", PlayerVehicle[playerid][pVeh2]);
     SaveVehicles(playerid, carid);
     format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
     printf(string);
     format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use it", VehicleNames[GetVehicleModel(carid)-400]);
     GameTextForPlayer(playerid, string, 8000, 5);
     GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
     DestroyVehicle(carid);
     //veh2[playerid] = 999;
     }
     else if(!strcmp(PlayerVehicle[playerid][pVeh3], "None", true))
     {
        new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
        GetPlayerName(playerid, playername, sizeof(playername));
      strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
      VehicleInfo[carid][vOwned] = 1;
       format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
      strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
      VehicleInfo[carid][vModel] = pCar[playerid];
      VehicleInfo[carid][vColorOne] = pColorS[playerid];
      VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
      VehicleInfo[carid][vComponent0]=0;
      VehicleInfo[carid][vComponent1]=0;
      VehicleInfo[carid][vComponent2]=0;
      VehicleInfo[carid][vComponent3]=0;
      VehicleInfo[carid][vComponent4]=0;
      VehicleInfo[carid][vComponent5]=0;
      VehicleInfo[carid][vComponent6]=0;
      VehicleInfo[carid][vComponent7]=0;
      VehicleInfo[carid][vComponent8]=0;
      VehicleInfo[carid][vComponent9]=0;
      VehicleInfo[carid][vComponent10]=0;
      VehicleInfo[carid][vComponent11]=0;
      VehicleInfo[carid][vComponent12]=0;
      VehicleInfo[carid][vComponent13]=0;
      VehicleInfo[carid][vPaintJob]=3;
      VehicleInfo[carid][vLock] = 0;
      VehicleInfo[carid][vLockBuyed] = 0;
      if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
      {//boat
        VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
        VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
        VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
        VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
      }
      else if(pCar[playerid] == 487)//heli
      {
        VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
        VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
        VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
        VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
      }
      else
      {
        VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
        VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
        VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
        VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
      }
      strmid(PlayerVehicle[playerid][pVeh3], string, 0, strlen(string), 255);
      new str[256], plname[MAX_PLAYER_NAME];
      GetPlayerName(playerid, plname, sizeof(plname));
      format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
      dini_Set(str, "Vehicle3", PlayerVehicle[playerid][pVeh3]);
      SaveVehicles(playerid, carid);
       format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
      printf(string);
      format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use /v spawn and park it", VehicleNames[GetVehicleModel(carid)-400]);
      GameTextForPlayer(playerid, string, 8000, 5);
      GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
      DestroyVehicle(carid);
      //veh3[playerid] = 999;
      }
      else if(!strcmp(PlayerVehicle[playerid][pVeh4], "None", true))
      {
        new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
         GetPlayerName(playerid, playername, sizeof(playername));
        strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
        VehicleInfo[carid][vOwned] = 1;
         format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
        strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
        VehicleInfo[carid][vModel] = pCar[playerid];
        VehicleInfo[carid][vColorOne] = pColorS[playerid];
        VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
        VehicleInfo[carid][vComponent0]=0;
        VehicleInfo[carid][vComponent1]=0;
        VehicleInfo[carid][vComponent2]=0;
        VehicleInfo[carid][vComponent3]=0;
        VehicleInfo[carid][vComponent4]=0;
        VehicleInfo[carid][vComponent5]=0;
        VehicleInfo[carid][vComponent6]=0;
        VehicleInfo[carid][vComponent7]=0;
        VehicleInfo[carid][vComponent8]=0;
        VehicleInfo[carid][vComponent9]=0;
        VehicleInfo[carid][vComponent10]=0;
        VehicleInfo[carid][vComponent11]=0;
        VehicleInfo[carid][vComponent12]=0;
        VehicleInfo[carid][vComponent13]=0;
        VehicleInfo[carid][vPaintJob]=3;
        VehicleInfo[carid][vLock] = 0;
        VehicleInfo[carid][vLockBuyed] = 0;
        if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
        {//boat
         VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
        }
        else if(pCar[playerid] == 487)//heli
        {
         VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
         }
        else
        {
         VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
        }
        strmid(PlayerVehicle[playerid][pVeh4], string, 0, strlen(string), 255);
        new str[256], plname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, plname, sizeof(plname));
        format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
        dini_Set(str, "Vehicle4", PlayerVehicle[playerid][pVeh4]);
        SaveVehicles(playerid, carid);
         format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
        printf(string);
        format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use /v spawn and park it", VehicleNames[GetVehicleModel(carid)-400]);
        GameTextForPlayer(playerid, string, 8000, 5);
        GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
        DestroyVehicle(carid);
        //veh4[playerid] = 999;
      }
      else if(!strcmp(PlayerVehicle[playerid][pVeh5], "None", true))
      {
        new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
         GetPlayerName(playerid, playername, sizeof(playername));
        strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
        VehicleInfo[carid][vOwned] = 1;
         format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
        strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
        VehicleInfo[carid][vModel] = pCar[playerid];
        VehicleInfo[carid][vColorOne] = pColorS[playerid];
        VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
        VehicleInfo[carid][vComponent0]=0;
        VehicleInfo[carid][vComponent1]=0;
        VehicleInfo[carid][vComponent2]=0;
        VehicleInfo[carid][vComponent3]=0;
        VehicleInfo[carid][vComponent4]=0;
        VehicleInfo[carid][vComponent5]=0;
        VehicleInfo[carid][vComponent6]=0;
        VehicleInfo[carid][vComponent7]=0;
        VehicleInfo[carid][vComponent8]=0;
        VehicleInfo[carid][vComponent9]=0;
        VehicleInfo[carid][vComponent10]=0;
        VehicleInfo[carid][vComponent11]=0;
        VehicleInfo[carid][vComponent12]=0;
        VehicleInfo[carid][vComponent13]=0;
        VehicleInfo[carid][vPaintJob]=3;
        VehicleInfo[carid][vLock] = 0;
        VehicleInfo[carid][vLockBuyed] = 0;
        if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
        {//boat
         VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
        }
        else if(pCar[playerid] == 487)//heli
        {
          VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
        }
        else
        {
         VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
        }
        strmid(PlayerVehicle[playerid][pVeh5], string, 0, strlen(string), 255);
        new str[256], plname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, plname, sizeof(plname));
        format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
        dini_Set(str, "Vehicle5", PlayerVehicle[playerid][pVeh5]);
        SaveVehicles(playerid, carid);
         format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
        printf(string);
        format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use /v spawn and park it", VehicleNames[GetVehicleModel(carid)-400]);
        GameTextForPlayer(playerid, string, 8000, 5);
        GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
        DestroyVehicle(carid);
         //veh5[playerid] = 999;
         return 1;
      }
      else
      {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You already own 5 vehicles !");
        return 1;
      }
     return 1;
   }
  }
Should work
Reply
#4

C:\Documents and Settings\Diego\Desktop\GodFather\gamemodes\daorp.p wn(3202) : warning 217: loose indentation
C:\Documents and Settings\Diego\Desktop\GodFather\gamemodes\daorp.p wn(3265) : warning 217: loose indentation
C:\Documents and Settings\Diego\Desktop\GodFather\gamemodes\daorp.p wn(332 : warning 217: loose indentation
C:\Documents and Settings\Diego\Desktop\GodFather\gamemodes\daorp.p wn(3345) : warning 217: loose indentation
C:\Documents and Settings\Diego\Desktop\GodFather\gamemodes\daorp.p wn(3346) : warning 217: loose indentation
C:\Documents and Settings\Diego\Desktop\GodFather\gamemodes\daorp.p wn(3454) : warning 217: loose indentation
C:\Documents and Settings\Diego\Desktop\GodFather\gamemodes\daorp.p wn(3485) : warning 217: loose indentation
C:\Documents and Settings\Diego\Desktop\GodFather\gamemodes\daorp.p wn(3487) : error 054: unmatched closing brace ("}")

I get those errors....
Reply
#5

whats at line 3487?
Reply
#6

}

Its just a bracket...
Reply
#7

come on MSN, ive added you.
Reply
#8

pawn Код:
public BuyingVeh(playerid)
{
  new playername[MAX_PLAYER_NAME];
  new string[256];
  new rand = random(sizeof(gCarSystemSpawns));
  if(!strcmp(PlayerVehicle[playerid][pVeh1], "None", true))
  {
   new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
   GetPlayerName(playerid, playername, sizeof(playername));
   strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
   VehicleInfo[carid][vOwned] = 1;
   format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
   strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
   VehicleInfo[carid][vModel] = pCar[playerid];
   VehicleInfo[carid][vColorOne] = pColorS[playerid];
   VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
   VehicleInfo[carid][vComponent0]=0;
   VehicleInfo[carid][vComponent1]=0;
   VehicleInfo[carid][vComponent2]=0;
   VehicleInfo[carid][vComponent3]=0;
   VehicleInfo[carid][vComponent4]=0;
   VehicleInfo[carid][vComponent5]=0;
   VehicleInfo[carid][vComponent6]=0;
   VehicleInfo[carid][vComponent7]=0;
   VehicleInfo[carid][vComponent8]=0;
   VehicleInfo[carid][vComponent9]=0;
   VehicleInfo[carid][vComponent10]=0;
   VehicleInfo[carid][vComponent11]=0;
   VehicleInfo[carid][vComponent12]=0;
   VehicleInfo[carid][vComponent13]=0;
   VehicleInfo[carid][vPaintJob]=3;
   VehicleInfo[carid][vLock] = 0;
   VehicleInfo[carid][vLockBuyed] = 0;
   new randkey = 10000 + random(89999);//minimum 1000 max 9999 //giving one at the start
   VehicleInfo[carid][vKey] = randkey;
   if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
   {//boat
     VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
     VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
     VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
     VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
   }
   else if(pCar[playerid] == 487)//heli
   {
      VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
     VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
     VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
     VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
   }
   else
   {
     VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
     VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
     VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
     VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
   }
   strmid(PlayerVehicle[playerid][pVeh1], string, 0, strlen(string), 255);
   new str[256], plname[MAX_PLAYER_NAME];
   GetPlayerName(playerid, plname, sizeof(plname));
   format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
   dini_Set(str, "Vehicle1", PlayerVehicle[playerid][pVeh1]);
   SaveVehicles(playerid, carid);
   format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
   printf(string);
   format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use it", VehicleNames[GetVehicleModel(carid)-400]);
   GameTextForPlayer(playerid, string, 8000, 5);
   GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
   DestroyVehicle(carid);
   //veh1[playerid] = 999;
   }
   else if(!strcmp(PlayerVehicle[playerid][pVeh2], "None", true))
   {
      new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
      GetPlayerName(playerid, playername, sizeof(playername));
     strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
     VehicleInfo[carid][vOwned] = 1;
     format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
     strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
     VehicleInfo[carid][vModel] = pCar[playerid];
     VehicleInfo[carid][vColorOne] = pColorS[playerid];
     VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
     VehicleInfo[carid][vComponent0]=0;
     VehicleInfo[carid][vComponent1]=0;
     VehicleInfo[carid][vComponent2]=0;
     VehicleInfo[carid][vComponent3]=0;
     VehicleInfo[carid][vComponent4]=0;
     VehicleInfo[carid][vComponent5]=0;
     VehicleInfo[carid][vComponent6]=0;
     VehicleInfo[carid][vComponent7]=0;
     VehicleInfo[carid][vComponent8]=0;
     VehicleInfo[carid][vComponent9]=0;
     VehicleInfo[carid][vComponent10]=0;
     VehicleInfo[carid][vComponent11]=0;
     VehicleInfo[carid][vComponent12]=0;
     VehicleInfo[carid][vComponent13]=0;
     VehicleInfo[carid][vPaintJob]=3;
     VehicleInfo[carid][vLock] = 0;
     VehicleInfo[carid][vLockBuyed] = 0;
     if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
     {//boat
      VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
      VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
      VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
      VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
     }
     else if(pCar[playerid] == 487)//heli
      {
       VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
      VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
      VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
      VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
     }
     else
     {
      VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
      VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
      VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
      VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
     }
     strmid(PlayerVehicle[playerid][pVeh2], string, 0, strlen(string), 255);
     new str[256], plname[MAX_PLAYER_NAME];
     GetPlayerName(playerid, plname, sizeof(plname));
     format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
     dini_Set(str, "Vehicle2", PlayerVehicle[playerid][pVeh2]);
     SaveVehicles(playerid, carid);
     format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
     printf(string);
     format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use it", VehicleNames[GetVehicleModel(carid)-400]);
     GameTextForPlayer(playerid, string, 8000, 5);
     GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
     DestroyVehicle(carid);
     //veh2[playerid] = 999;
     }
     else if(!strcmp(PlayerVehicle[playerid][pVeh3], "None", true))
     {
        new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
        GetPlayerName(playerid, playername, sizeof(playername));
      strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
      VehicleInfo[carid][vOwned] = 1;
       format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
      strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
      VehicleInfo[carid][vModel] = pCar[playerid];
      VehicleInfo[carid][vColorOne] = pColorS[playerid];
      VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
      VehicleInfo[carid][vComponent0]=0;
      VehicleInfo[carid][vComponent1]=0;
      VehicleInfo[carid][vComponent2]=0;
      VehicleInfo[carid][vComponent3]=0;
      VehicleInfo[carid][vComponent4]=0;
      VehicleInfo[carid][vComponent5]=0;
      VehicleInfo[carid][vComponent6]=0;
      VehicleInfo[carid][vComponent7]=0;
      VehicleInfo[carid][vComponent8]=0;
      VehicleInfo[carid][vComponent9]=0;
      VehicleInfo[carid][vComponent10]=0;
      VehicleInfo[carid][vComponent11]=0;
      VehicleInfo[carid][vComponent12]=0;
      VehicleInfo[carid][vComponent13]=0;
      VehicleInfo[carid][vPaintJob]=3;
      VehicleInfo[carid][vLock] = 0;
      VehicleInfo[carid][vLockBuyed] = 0;
      if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
      {//boat
        VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
        VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
        VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
        VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
      }
      else if(pCar[playerid] == 487)//heli
      {
        VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
        VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
        VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
        VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
      }
      else
      {
        VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
        VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
        VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
        VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
      }
      strmid(PlayerVehicle[playerid][pVeh3], string, 0, strlen(string), 255);
      new str[256], plname[MAX_PLAYER_NAME];
      GetPlayerName(playerid, plname, sizeof(plname));
      format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
      dini_Set(str, "Vehicle3", PlayerVehicle[playerid][pVeh3]);
      SaveVehicles(playerid, carid);
       format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
      printf(string);
      format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use /v spawn and park it", VehicleNames[GetVehicleModel(carid)-400]);
      GameTextForPlayer(playerid, string, 8000, 5);
      GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
      DestroyVehicle(carid);
      //veh3[playerid] = 999;
      }
      else if(!strcmp(PlayerVehicle[playerid][pVeh4], "None", true))
      {
        new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
         GetPlayerName(playerid, playername, sizeof(playername));
        strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
        VehicleInfo[carid][vOwned] = 1;
         format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
        strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
        VehicleInfo[carid][vModel] = pCar[playerid];
        VehicleInfo[carid][vColorOne] = pColorS[playerid];
        VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
        VehicleInfo[carid][vComponent0]=0;
        VehicleInfo[carid][vComponent1]=0;
        VehicleInfo[carid][vComponent2]=0;
        VehicleInfo[carid][vComponent3]=0;
        VehicleInfo[carid][vComponent4]=0;
        VehicleInfo[carid][vComponent5]=0;
        VehicleInfo[carid][vComponent6]=0;
        VehicleInfo[carid][vComponent7]=0;
        VehicleInfo[carid][vComponent8]=0;
        VehicleInfo[carid][vComponent9]=0;
        VehicleInfo[carid][vComponent10]=0;
        VehicleInfo[carid][vComponent11]=0;
        VehicleInfo[carid][vComponent12]=0;
        VehicleInfo[carid][vComponent13]=0;
        VehicleInfo[carid][vPaintJob]=3;
        VehicleInfo[carid][vLock] = 0;
        VehicleInfo[carid][vLockBuyed] = 0;
        if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
        {//boat
         VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
        }
        else if(pCar[playerid] == 487)//heli
        {
         VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
         }
        else
        {
         VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
        }
        strmid(PlayerVehicle[playerid][pVeh4], string, 0, strlen(string), 255);
        new str[256], plname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, plname, sizeof(plname));
        format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
        dini_Set(str, "Vehicle4", PlayerVehicle[playerid][pVeh4]);
        SaveVehicles(playerid, carid);
         format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
        printf(string);
        format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use /v spawn and park it", VehicleNames[GetVehicleModel(carid)-400]);
        GameTextForPlayer(playerid, string, 8000, 5);
        GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
        DestroyVehicle(carid);
        //veh4[playerid] = 999;
      }
      else if(!strcmp(PlayerVehicle[playerid][pVeh5], "None", true))
      {
        new carid = CreateVehicle(pCar[playerid], 340.5165,-1337.5707,14.1347, 29.8872, pColorS[playerid], pColor2S[playerid], 60000);
         GetPlayerName(playerid, playername, sizeof(playername));
        strmid(VehicleInfo[carid][vOwner], playername, 0, strlen(playername), 255);
        VehicleInfo[carid][vOwned] = 1;
         format(string, sizeof(string), "%s.%s", playername, VehicleNames[GetVehicleModel(carid)-400]);
        strmid(VehicleInfo[carid][vDescription], string, 0, strlen(string), 255);
        VehicleInfo[carid][vModel] = pCar[playerid];
        VehicleInfo[carid][vColorOne] = pColorS[playerid];
        VehicleInfo[carid][vColorTwo] = pColor2S[playerid];
        VehicleInfo[carid][vComponent0]=0;
        VehicleInfo[carid][vComponent1]=0;
        VehicleInfo[carid][vComponent2]=0;
        VehicleInfo[carid][vComponent3]=0;
        VehicleInfo[carid][vComponent4]=0;
        VehicleInfo[carid][vComponent5]=0;
        VehicleInfo[carid][vComponent6]=0;
        VehicleInfo[carid][vComponent7]=0;
        VehicleInfo[carid][vComponent8]=0;
        VehicleInfo[carid][vComponent9]=0;
        VehicleInfo[carid][vComponent10]=0;
        VehicleInfo[carid][vComponent11]=0;
        VehicleInfo[carid][vComponent12]=0;
        VehicleInfo[carid][vComponent13]=0;
        VehicleInfo[carid][vPaintJob]=3;
        VehicleInfo[carid][vLock] = 0;
        VehicleInfo[carid][vLockBuyed] = 0;
        if(pCar[playerid] == 473||pCar[playerid] == 454||pCar[playerid] == 446)
        {//boat
         VehicleInfo[carid][vX] = gBoatSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gBoatSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gBoatSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gBoatSystemSpawns[rand][3];
        }
        else if(pCar[playerid] == 487)//heli
        {
          VehicleInfo[carid][vX] = gHeliSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gHeliSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gHeliSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gHeliSystemSpawns[rand][3];
        }
        else
        {
         VehicleInfo[carid][vX] = gCarSystemSpawns[rand][0];
         VehicleInfo[carid][vY] = gCarSystemSpawns[rand][1];
         VehicleInfo[carid][vZ] = gCarSystemSpawns[rand][2];
         VehicleInfo[carid][vAngle] = gCarSystemSpawns[rand][3];
        }
        strmid(PlayerVehicle[playerid][pVeh5], string, 0, strlen(string), 255);
        new str[256], plname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, plname, sizeof(plname));
        format(str, sizeof(str), "Vehicles/Players/%s.cfg", plname);
        dini_Set(str, "Vehicle5", PlayerVehicle[playerid][pVeh5]);
        SaveVehicles(playerid, carid);
         format(string, sizeof(string), "%s bought a %s.", playername, VehicleNames[GetVehicleModel(carid)-400]);
        printf(string);
        format(string, sizeof(string), "~y~%s buyed ~n~~w~don't forgot to use /v spawn and park it", VehicleNames[GetVehicleModel(carid)-400]);
        GameTextForPlayer(playerid, string, 8000, 5);
        GiveCash(playerid, -CarsPrices[pCar[playerid]-400]);
        DestroyVehicle(carid);
         //veh5[playerid] = 999;
         return 1;
      }
      else
      {
        SendClientMessage(playerid, COLOR_LIGHTRED, "You already own 5 vehicles !");
       return 1;
       }
}
Opps my bad before its like this
Reply
#9

Thanks, but i got it fixed already
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)