07.07.2010, 07:24
stock GetSlotOfSpawnedVehicle(playerid)
{
// Funkcija: GetSlotOfSpawnedVehicle(playerid)
for (new i = 0; i < MAX_OWNABLE_VEHICLES; i++)
if (VehInfo[ playerid ][ i ][ vSpawned ])
return i;
return MAX_OWNABLE_VEHICLES;
}
Return i??!?!?!?!?!?!?!? I am not such a good scripter but i think it should be 1
else if (!strcmp( result, "deletev", true ))
{
new
slot = GetSlotOfSpawnedVehicle(playerid);
if (slot < MAX_OWNABLE_VEHICLES)
{
DropVehicleRow(VehInfo[playerid][slot][vDBID]);
ShowInfoText(playerid, "Your vehicle is deleted", 4000);
TogglePlayerControllable(playerid, true);
}
else
SendClientMessage(playerid, COLOR_GREY, "Tuo not spawn vehicle");
}
{
// Funkcija: GetSlotOfSpawnedVehicle(playerid)
for (new i = 0; i < MAX_OWNABLE_VEHICLES; i++)
if (VehInfo[ playerid ][ i ][ vSpawned ])
return i;
return MAX_OWNABLE_VEHICLES;
}
Return i??!?!?!?!?!?!?!? I am not such a good scripter but i think it should be 1
else if (!strcmp( result, "deletev", true ))
{
new
slot = GetSlotOfSpawnedVehicle(playerid);
if (slot < MAX_OWNABLE_VEHICLES)
{
DropVehicleRow(VehInfo[playerid][slot][vDBID]);
ShowInfoText(playerid, "Your vehicle is deleted", 4000);
TogglePlayerControllable(playerid, true);
}
else
SendClientMessage(playerid, COLOR_GREY, "Tuo not spawn vehicle");
}