01.01.2014, 14:13
Hello, Happy New Year!
I have problem, i have a Vehicles for buy, when i buy it its all good when i go off go back Vehicle is good but when i go to Restart Server vehicle go in 'BUY' and i can buy it. But when i buy it one more time it is good when i Restart Server.
On OnGameModeInit i have:
Timer_sVehicles = SetTimer( "UpdateVehicles", VEHICLE_UPDATE_TIME, true );
VEHICLE_UPDATE_TIME is 2000
Im wait on server 5 sec and dont work ...
I have problem, i have a Vehicles for buy, when i buy it its all good when i go off go back Vehicle is good but when i go to Restart Server vehicle go in 'BUY' and i can buy it. But when i buy it one more time it is good when i Restart Server.
On OnGameModeInit i have:
Timer_sVehicles = SetTimer( "UpdateVehicles", VEHICLE_UPDATE_TIME, true );
VEHICLE_UPDATE_TIME is 2000
Im wait on server 5 sec and dont work ...
Код:
if( dialogid == DIALOG_VEHICLE_BUY && response ) { if( PlayerInfo[ playerid ][ xCash ] < VehicleInfo[ GetPlayerVehicleID( playerid ) ][ vehPrice ] ) return SCM( playerid, RED, "Nemate dovoljno novca!" ); Delete3DTextLabel( VehicleLabel[ GetPlayerVehicleID( playerid ) ] ); GivePlayerCash( playerid, -VehicleInfo[ GetPlayerVehicleID( playerid ) ][ vehPrice ] ); format( DialogStrg, sizeof( DialogStrg ), "Uspjesno ste kupili ovo vozilo za $%d! Upisite /car help za daljnju pomoc!", VehicleInfo[ GetPlayerVehicleID( playerid ) ][ vehPrice ] ); SCM( playerid, GREEN, DialogStrg ); GetName( playerid, PlayerName ); VehicleInfo[ GetPlayerVehicleID( playerid ) ][ vehOwner ] = PlayerName; return true; }