Help about Vehicle Buy - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help about Vehicle Buy (
/showthread.php?tid=484773)
Help about Vehicle Buy -
shulk - 01.01.2014
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 ...
Код:
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;
}
Re: Help about Vehicle Buy -
shulk - 01.01.2014
Anybody?