if(CurrentMenu3 == TunedVehicles) { switch(row) { case 0: { TogglePlayerControllable(playerid, 1); if (GetPlayerMoney(playerid) >= 0) { if(IsPlayerInAnyVehicle(playerid)) { TogglePlayerControllable(playerid, 0); ShowMenuForPlayer(TunedVehicles,playerid); SendClientMessage(playerid, COLOR_RED, "You are already in car."); return 1; } else { TogglePlayerControllable(playerid, 1); GivePlayerMoney(playerid, -0); CreateVehicle (562, x, y, z + 2.0, a + 90.0, -1, -1, 5000); LinkVehicleToInterior(PlayerVehI[playerid], GetPlayerInterior(playerid)); ChangeVehiclePaintjob(PlayerVehI[playerid],random(2)+1); AddVehicleComponent(PlayerVehI[playerid],1037); AddVehicleComponent(PlayerVehI[playerid],1010); AddVehicleComponent(PlayerVehI[playerid],1035); AddVehicleComponent(PlayerVehI[playerid],1039); AddVehicleComponent(PlayerVehI[playerid],1041); AddVehicleComponent(PlayerVehI[playerid],1086); AddVehicleComponent(PlayerVehI[playerid],1087); AddVehicleComponent(PlayerVehI[playerid],1147); AddVehicleComponent(PlayerVehI[playerid],1148); AddVehicleComponent(PlayerVehI[playerid],1172); SendClientMessage(playerid, COLOR_GREEN, "You selected a tuned Elegy"); } } else { TogglePlayerControllable(playerid, 0); ShowMenuForPlayer(TunedVehicles,playerid); return 1; }}
if(CurrentMenu3 == TunedVehicles)
{
switch(row)
{
case 0:
{
TogglePlayerControllable(playerid, 1);
if (GetPlayerMoney(playerid) >= 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
TogglePlayerControllable(playerid, 0);
ShowMenuForPlayer(TunedVehicles,playerid);
SendClientMessage(playerid, COLOR_RED, "You are already in car.");
return 1;
}
else
{
TogglePlayerControllable(playerid, 1);
GivePlayerMoney(playerid, -0);
CreateVehicle (562, x, y, z + 2.0, a + 90.0, -1, -1, 5000);
LinkVehicleToInterior(PlayerVehI[playerid], GetPlayerInterior(playerid));
ChangeVehiclePaintjob(PlayerVehI[playerid],random(2)+1);
AddVehicleComponent(PlayerVehI[playerid],1037);
AddVehicleComponent(PlayerVehI[playerid],1010);
AddVehicleComponent(PlayerVehI[playerid],1035);
AddVehicleComponent(PlayerVehI[playerid],1039);
AddVehicleComponent(PlayerVehI[playerid],1041);
AddVehicleComponent(PlayerVehI[playerid],1086);
AddVehicleComponent(PlayerVehI[playerid],1087);
AddVehicleComponent(PlayerVehI[playerid],1147);
AddVehicleComponent(PlayerVehI[playerid],1148);
AddVehicleComponent(PlayerVehI[playerid],1172);
SendClientMessage(playerid, COLOR_GREEN, "You selected a tuned Elegy");
}
}
}
}
else
{
TogglePlayerControllable(playerid, 0);
ShowMenuForPlayer(TunedVehicles,playerid);
return 1;
}
}
Originally Posted by ǝɹoɯ‾ʎ
It helps to have good indentation , I saw a few bracket errors within the code, might fix it.
pawn Код:
|
ALso I didn't find the "Enjoy your ride" sendclietnmessage in there, please add that piece of code. |
CreateVehicle(ID, X, Y, Z, A, C, C, 0); ?