Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Comanda /cars (contine numar maxim de sloturi 13)
- CMD:cars ( playerid, params [ ] )
- {
- if ( isnull ( params ) )
- {
- new string[880];
- new const vehicleidd = GetPlayerVehicleID ( playerid );
- format(string, sizeof(string), "UPDATE `vehicles` SET `sqlid` = '%i' WHERE `sqlid` = '%i' ", vInfo [ vehicleidd ] [ vSQLID ]);
- mysql_tquery(mysql_db, string);
- if ( pVeh [ playerid ] [ 0 ] == -1 && pVeh [ playerid ] [ 1 ] == -1 && pVeh [ playerid ] [ 2 ] == -1
- && pVeh [ playerid ] [ 3 ] == -1 && pVeh [ playerid ] [ 4 ] == -1 && pVeh [ playerid ] [ 5 ] == -1 && pVeh [ playerid ] [ 6 ] == -1 && pVeh [ playerid ] [ 7 ] == -1
- && pVeh [ playerid ] [ 8 ] == -1 && pVeh [ playerid ] [ 9 ] == -1 && pVeh [ playerid ] [ 10 ] == -1 && pVeh [ playerid ] [ 11 ] == -1 && pVeh [ playerid ] [ 12 ] == -1) return SendClientMessage ( playerid, -1, "* Nu detii vehicule personale." );
- new vehicleid = pVeh [ playerid ] [ 0 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s(%s)\n", GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 1 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)\n",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 2 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)\n",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 3 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)\n",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 4 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)\n",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 5 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)\n",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 6 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)\n",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 7 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)\n",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 8 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)\n",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 9 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)\n",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 10 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)\n",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 11 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)\n",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- vehicleid = pVeh [ playerid ] [ 12 ];
- if ( vehicleid != -1 )
- {
- format ( string, sizeof ( string ), "%s%s(%s)",string, GetVehicleName ( vInfo [ vehicleid ] [ vModel ] ), ( ( vInfo [ vehicleid ] [ vLock ] ) ? ( "{FF0000}Locked" ) : ( "{00FF15}Unlocked" ) ) );
- }
- ShowPlayerDialog ( playerid, DIALOG_CARS, DIALOG_STYLE_LIST, "Vehicule personale", string, "Select", "Close" );
- }
- return 1;
- }
- Callback OnDialogResponse
- if(dialogid == DIALOG_CARS)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 1:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD1,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 2:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD2,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 3:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD3,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 4:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD4,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 5:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD5,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 6:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD6,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 7:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD7,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 8:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD8,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 9:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD9,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 10:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD10,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 11:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD11,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- case 12:
- {
- ShowPlayerDialog(playerid,DIALOG_MOD12,DIALOG_STYLE_LIST,"Panel Vehicul","Info Car\nTow Car\nFind Car\nPark Vehicle", "Select", "Close");
- }
- }
- return 1;
- }
- return 0;
- }
- if(dialogid == DIALOG_MOD)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- new vehid = pVeh [ playerid ] [ 0 ];
- if(vehid != -1 )
- {
- format(string, sizeof(string), "Model: %s\n%s\nPrice %s\nLicense Plate: %s", GetVehicleName ( vInfo [ vehid ] [ vModel ] ),( ( vInfo [ vehid ] [ vLock ] ) ? ( "Locked" ) : ( "Unlocked" ) ), FormatMoney ( vInfo [ vehid ] [ vPrice ] ), vInfo [ vehid ] [ vPlate ] );
- }
- ShowPlayerDialog ( playerid, 550, DIALOG_STYLE_MSGBOX, "Vehicle Info", string, "OK", "" );
- }
- case 1:
- {
- SetVehicleToRespawn ( pVeh [ playerid ] [ 0 ] );
- GivePlayerMoney ( playerid, -2500 );
- SBizzInfo[8][sbTill] += 2500;//towcar buisness
- ExtortionSBiz(8, 2500);
- SBizzInfo[8][sbProducts]--;
- SCM(playerid,COLOR_WHITE,"Ti-au fost retrasi din cont suma de 2,500 $");
- }
- case 2:
- {
- new Float: cPos [ 3 ];
- GetVehiclePos ( pVeh [ playerid ] [ 0 ], cPos [ 0 ], cPos [ 1 ], cPos [ 2 ] );
- pSearchingVeh { playerid } = true;
- SetPlayerCheckpoint ( playerid, cPos [ 0 ], cPos [ 1 ], cPos [ 2 ], 5.0 );
- SendClientMessage ( playerid, -1, "* Ti-a fost setat un checkpoint pe minimap, du-te la el pentru a-ti gasi vehiculul." );
- }
- case 3:
- {
- new const vehicleid = GetPlayerVehicleID ( playerid );
- if ( vehicleid != pVeh [ playerid ] [ 0 ] ) return SendClientMessage ( playerid, -1, "* Nu esti in vehiculul cu slot 1." );
- GetVehiclePos ( vehicleid, vInfo [ vehicleid ] [ vPos ] [ 0 ], vInfo [ vehicleid ] [ vPos ] [ 1 ], vInfo [ vehicleid ] [ vPos ] [ 2 ] );
- GetVehicleZAngle ( vehicleid, vInfo [ vehicleid ] [ vPos ] [ 3 ] );
- SaveVehicle ( vehicleid, TYPE_STATS );
- SendClientMessage ( playerid, -1, "* Aici iti vei gasi vehiculul personal." );
- }
- }
- return 1;
- }
- return 0;
- }
- if(dialogid == DIALOG_MOD1)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- new vehid = pVeh [ playerid ] [ 1 ];
- if(vehid != -1 )
- {
- format(string, sizeof(string), "Model: %s\n%s\nPrice %s\nLicense Plate: %s", GetVehicleName ( vInfo [ vehid ] [ vModel ] ),( ( vInfo [ vehid ] [ vLock ] ) ? ( "Locked" ) : ( "Unlocked" ) ), FormatMoney ( vInfo [ vehid ] [ vPrice ] ), vInfo [ vehid ] [ vPlate ] );
- }
- ShowPlayerDialog ( playerid, 551, DIALOG_STYLE_MSGBOX, "Vehicle Info", string, "OK", "" );
- }
- case 1:
- {
- SetVehicleToRespawn ( pVeh [ playerid ] [ 1 ] );
- GivePlayerMoney ( playerid, -2500 );
- SBizzInfo[8][sbTill] += 2500;//towcar buisness
- ExtortionSBiz(8, 2500);
- SBizzInfo[8][sbProducts]--;
- SCM(playerid,COLOR_WHITE,"Ti-au fost retrasi din cont suma de 2,500 $");
- }
- case 2:
- {
- new Float: cPos [ 3 ];
- GetVehiclePos ( pVeh [ playerid ] [ 1 ], cPos [ 0 ], cPos [ 1 ], cPos [ 2 ] );
- pSearchingVeh { playerid } = true;
- SetPlayerCheckpoint ( playerid, cPos [ 0 ], cPos [ 1 ], cPos [ 2 ], 5.0 );
- SendClientMessage ( playerid, -1, "* Ti-a fost setat un checkpoint pe minimap, du-te la el pentru a-ti gasi vehiculul." );
- }
- case 3:
- {
- new const vehicleid = GetPlayerVehicleID ( playerid );
- if ( vehicleid != pVeh [ playerid ] [ 1 ] ) return SendClientMessage ( playerid, -1, "* Nu esti in vehiculul cu slot 2." );
- GetVehiclePos ( vehicleid, vInfo [ vehicleid ] [ vPos ] [ 0 ], vInfo [ vehicleid ] [ vPos ] [ 1 ], vInfo [ vehicleid ] [ vPos ] [ 2 ] );
- GetVehicleZAngle ( vehicleid, vInfo [ vehicleid ] [ vPos ] [ 3 ] );
- SaveVehicle ( vehicleid, TYPE_STATS );
- SendClientMessage ( playerid, -1, "* Aici iti vei gasi vehiculul personal." );
- }
- }
- return 1;
- }
- return 0;
- }
- la ondialog response este pana la DIALOG_MOD12... nu mai are rost cred sa tot incarc scriptul
Add Comment
Please, Sign In to add comment