06.07.2010, 14:45
This function is not work, what ir wrong?
And is this not working for this command
Код:
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; }
Код:
else if ( !strcmp( result, "deletev", true ) ) { new slot = GetSlotOfSpawnedVehicle( playerid ); if ( slot < MAX_OWNABLE_VEHICLES ) { DropVehicleRow( VehInfo[ playerid ][ slot ][ vDBID ] ); ShowInfoText ( playerid, "yuor vehicle is deleted", 4000 ); TogglePlayerControllable( playerid, true ); } else SendClientMessage( playerid, COLOR_GREY, "Tuo not spawn vehicle" ); }