Stincky

Membres
  • Compteur de contenus

    12
  • Points

  • Inscription

  • Dernière visite

Réputation sur la communauté

0 Neutre

À propos de Stincky

  • Rang
    Membre

Compétences

  • Pawn
  • Web front-end
  • Web back-end
  • Mapping
  • Réseau
  • Graphisme

Visiteurs récents du profil

70 visualisations du profil

Humeur

  • Triste
  • Votre humeur coran js triste
  1. Oui, je vais essayez on va bien voir.
  2. j'ai juste traduit et supprimer les despawntimer
  3. Bah ... Je sais pas au pire télécharge le script si tu veux comme sa tu pourra mieux voir
  4. public OnPlayerStateChange(playerid, newstate, oldstate) { if(PlayerInfo[playerid][pKicked]) return 0; if(newstate == PLAYER_STATE_DRIVER) { new vehicleid = GetPlayerVehicleID(playerid); if((pizzaVehicles[0] <= vehicleid <= pizzaVehicles[5]) && !PlayerHasJob(playerid, JOB_PIZZAMAN)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Pizzaman."); RemovePlayerFromVehicle(playerid); return 1; } if((courierVehicles[0] <= vehicleid <= courierVehicles[6]) && !PlayerHasJob(playerid, JOB_COURIER)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Courier."); RemovePlayerFromVehicle(playerid); return 1; } if((sweeperVehicles[0] <= vehicleid <= sweeperVehicles[3]) && !PlayerHasJob(playerid, JOB_SWEEPER)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Street Sweeper."); RemovePlayerFromVehicle(playerid); return 1; } if((taxiVehicles[0] <= vehicleid <= taxiVehicles[3]) && !PlayerHasJob(playerid, JOB_TAXIDRIVER)) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a Taxi Driver."); RemovePlayerFromVehicle(playerid); return 1; } if((testVehicles[0] <= vehicleid <= testVehicles[4]) && !PlayerInfo[playerid][pDrivingTest]) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not taking your drivers test."); RemovePlayerFromVehicle(playerid); return 1; } if(VehicleInfo[vehicleid][vFactionType] != FACTION_NONE && GetFactionType(playerid) != VehicleInfo[vehicleid][vFactionType]) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as it doesn't belong to your faction."); RemovePlayerFromVehicle(playerid); return 1; } if(VehicleInfo[vehicleid][vGang] >= 0 && PlayerInfo[playerid][pGang] != VehicleInfo[vehicleid][vGang]) { SendClientMessage(playerid, COLOR_GREY, "You cannot operate this vehicle as it doesn't belong to your gang."); RemovePlayerFromVehicle(playerid); return 1; } if(VehicleInfo[vehicleid][vJob] >= 0 && PlayerInfo[playerid][pJob] != VehicleInfo[vehicleid][vJob]) { SendClientMessageEx(playerid, COLOR_GREY, "You cannot operate this vehicle as you are not a %s.", GetJobName(VehicleInfo[vehicleid][vJob])); RemovePlayerFromVehicle(playerid); return 1; } if(!VehicleHasEngine(vehicleid)) { SetVehicleParams(vehicleid, VEHICLE_ENGINE, true); } else if(!GetVehicleParams(vehicleid, VEHICLE_ENGINE)) { if(testVehicles[0] <= vehicleid <= testVehicles[4]) { PlayerInfo[playerid][pCP] = CHECKPOINT_TEST; PlayerInfo[playerid][pTestVehicle] = vehicleid; PlayerInfo[playerid][pTestCP] = 0; SetVehicleParams(vehicleid, VEHICLE_ENGINE, 1); SetPlayerCheckpoint(playerid, drivingTestCPs[PlayerInfo[playerid][pTestCP]][0], drivingTestCPs[PlayerInfo[playerid][pTestCP]][1], drivingTestCPs[PlayerInfo[playerid][pTestCP]][2], 3.0); SendClientMessage(playerid, COLOR_AQUA, "Drive through the checkpoints to proceed with the test. Try not to damage your vehicle."); } else { GameTextForPlayer(playerid, "~r~Demarrer le moteur~n~~w~/engine", 3000, 3); } } if(!PlayerInfo[playerid][pCarLicense] && !PlayerInfo[playerid][pDrivingTest]) { SendClientMessage(playerid, COLOR_LIGHTRED, "** Vous conduisez sans votre permis, vous pouvez vous faire arrêter a tous moment."); } if(IsVehicleOwner(playerid, vehicleid) && VehicleInfo[vehicleid][vTickets] > 0) { SendClientMessageEx(playerid, COLOR_AQUA, "This vehicle has $%i in unpaid tickets. You can pay your tickets using /paytickets.", VehicleInfo[vehicleid][vTickets]); } if(!PlayerInfo[playerid][pToggleTextdraws]) { PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][1]); PlayerTextDrawShow(playerid, PlayerInfo[playerid][pText][2]); } SetPlayerArmedWeapon(playerid, 0); /*if(isnull(vehicleStream[vehicleid])) { SendClientMessage(playerid, COLOR_LIGHTORANGE, "Radio: Use {FFD700}/setradio{F7A763} to listen to a radio station."); }*/ /*if(isnull(vehicleStream[vehicleid])) { SendClientMessage(playerid, COLOR_WHITE, "** Use {C8C8C8}/setradio{FFFFFF} to change the radio station in this vehicle."); }*/ } else if(oldstate == PLAYER_STATE_DRIVER) { if(PlayerInfo[playerid][pDrivingTest]) { PlayerInfo[playerid][pDrivingTest] = 0; SetVehicleToRespawn(PlayerInfo[playerid][pTestVehicle]); SendClientMessage(playerid, COLOR_LIGHTRED, "** You have exited the vehicle and therefore failed the test."); } PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][1]); PlayerTextDrawHide(playerid, PlayerInfo[playerid][pText][2]); } else if(newstate == PLAYER_STATE_PASSENGER) { new driverid = GetVehicleDriver(GetPlayerVehicleID(playerid)); if((driverid != INVALID_VEHICLE_ID && PlayerInfo[driverid][pTaxiFare] > 0 && PlayerInfo[driverid][pTaxiPassenger] == INVALID_PLAYER_ID) && (GetVehicleModel(GetPlayerVehicleID(playerid)) == 420 || GetVehicleModel(GetPlayerVehicleID(playerid)) == 438)) { if(PlayerInfo[playerid][pCash] < PlayerInfo[driverid][pTaxiFare]) { SendClientMessage(playerid, COLOR_GREY, "You can't afford to pay the fare. Therefore you can't ride this taxi."); RemovePlayerFromVehicle(playerid); return 1; } PlayerInfo[driverid][pTaxiPassenger] = playerid; PlayerInfo[driverid][pTaxiBill] = PlayerInfo[driverid][pTaxiFare]; PlayerInfo[driverid][pTaxiTime] = 0; SendProximityMessage(playerid, 20.0, COLOR_PURPLE, "** %s enters %s's taxi cab.", GetPlayerRPName(playerid), GetPlayerRPName(driverid)); SendClientMessageEx(playerid, COLOR_YELLOW, "You will be charged the fare price of {FF6347}$%i{33CCFF} every 15 seconds during your ride.", PlayerInfo[driverid][pTaxiFare]); SendClientMessageEx(driverid, COLOR_AQUA, "*%s has entered your taxi. You will earn {00AA00}$%i{33CCFF} every 15 seconds during the ride.", GetPlayerRPName(playerid), PlayerInfo[driverid][pTaxiFare]); } switch(GetPlayerWeapon(playerid)) { case 22, 23, 25, 28..34: SetPlayerArmedWeapon(playerid, GetScriptWeapon(playerid)); default: SetPlayerArmedWeapon(playerid, 0); } } if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { new vehicleid = GetPlayerVehicleID(playerid); foreach(new i : Player) { if(GetPlayerState(i) == PLAYER_STATE_SPECTATING && PlayerInfo[i][pSpectating] == playerid) { PlayerSpectateVehicle(i, vehicleid); } } if(!isnull(vehicleStream[vehicleid]) && PlayerInfo[playerid][pStreamType] == MUSIC_NONE && !PlayerInfo[playerid][pToggleMusic]) { PlayerInfo[playerid][pStreamType] = MUSIC_VEHICLE; PlayAudioStreamForPlayer(playerid, vehicleStream[vehicleid]); SendClientMessage(playerid, COLOR_WHITE, "** Vous entendez maintenant l'autoradio du véhicule - /stopmusic to stop listening."); } } else if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER) { foreach(new i : Player) { if(GetPlayerState(i) == PLAYER_STATE_SPECTATING && PlayerInfo[i][pSpectating] == playerid) { PlayerSpectatePlayer(i, playerid); } } if(PlayerInfo[playerid][pStreamType] == MUSIC_VEHICLE) { StopAudioStreamForPlayer(playerid); PlayerInfo[playerid][pStreamType] = MUSIC_NONE; } } return 1; }
  5. Sa le fais pour tout les véhicules, faction, job... Et tous les joueurs
  6. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CARRY) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z + 0.5); ClearAnimations(playerid); } if((!ispassenger) && (PlayerInfo[playerid][pCuffed] || PlayerInfo[playerid][pInjured])) { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); SetPlayerPos(playerid, x, y, z + 0.5); ClearAnimations(playerid); } if(!ispassenger) { if((pizzaVehicles[0] <= vehicleid <= pizzaVehicles[5]) && !PlayerHasJob(playerid, JOB_PIZZAMAN)) { SendClientMessage(playerid, COLOR_GREY, "Vous ne pouvez pas rentrer dans ce véhicule, vous n'êtes pas Pizzaman."); ClearAnimations(playerid); } if((courierVehicles[0] <= vehicleid <= courierVehicles[6]) && !PlayerHasJob(playerid, JOB_COURIER)) { SendClientMessage(playerid, COLOR_GREY, "Vous ne pouvez pas rentrer dans ce véhicule, vous n'êtes pas Courier."); ClearAnimations(playerid); } if((sweeperVehicles[0] <= vehicleid <= sweeperVehicles[3]) && !PlayerHasJob(playerid, JOB_SWEEPER)) { SendClientMessage(playerid, COLOR_GREY, "Vous ne pouvez pas rentrer dans ce véhicule, vous n'êtes pas Street Sweeper."); ClearAnimations(playerid); } if((taxiVehicles[0] <= vehicleid <= taxiVehicles[3]) && !PlayerHasJob(playerid, JOB_TAXIDRIVER)) { SendClientMessage(playerid, COLOR_GREY, "Vous ne pouvez pas rentrer dans ce véhicule, vous n'êtes pas un Taxi Driver."); ClearAnimations(playerid); } if((testVehicles[0] <= vehicleid <= testVehicles[4]) && !PlayerInfo[playerid][pDrivingTest]) { SendClientMessage(playerid, COLOR_GREY, "Vous ne pouvez pas prendre ce véhicule quand vous ne passez pas votre test DMV."); ClearAnimations(playerid); } if(VehicleInfo[vehicleid][vFactionType] != FACTION_NONE && GetFactionType(playerid) != VehicleInfo[vehicleid][vFactionType]) { SendClientMessage(playerid, COLOR_GREY, "Vous ne pouvez pas rentrer dans ce véhicule, vous ne faites pas partie de la faction en question."); ClearAnimations(playerid); } if(VehicleInfo[vehicleid][vGang] >= 0 && PlayerInfo[playerid][pGang] != VehicleInfo[vehicleid][vGang]) { SendClientMessage(playerid, COLOR_GREY, "Vous ne pouvez pas rentrer dans ce véhicule, vous ne faites pas partie du gang en question."); ClearAnimations(playerid); } if(VehicleInfo[vehicleid][vJob] >= 0 && PlayerInfo[playerid][pJob] != VehicleInfo[vehicleid][vJob]) { SendClientMessageEx(playerid, COLOR_GREY, "Vous ne pouvez pas rentrer dans ce véhicule car vous n'êtes pas %s.", GetJobName(VehicleInfo[vehicleid][vJob])); ClearAnimations(playerid); } } return 1; }
  7. DespawnVehicle(vehicleid, bool:save = true) { if(VehicleInfo[vehicleid][vID] > 0) { if(VehicleInfo[vehicleid][vNeonEnabled]) { DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][0]); DestroyDynamicObject(VehicleInfo[vehicleid][vObjects][1]); } if(save) { new Float:health; GetVehicleHealth(vehicleid, health); SaveVehicleModifications(vehicleid); mysql_format(connectionID, queryBuffer, sizeof(queryBuffer), "UPDATE vehicles SET fuel = %i, health = '%f' WHERE id = %i", vehicleFuel[vehicleid], health, VehicleInfo[vehicleid][vID]); mysql_tquery(connectionID, queryBuffer); } DestroyVehicle(vehicleid); ResetVehicle(vehicleid); } } // ResetVehicle(vehicleid) { strcpy(VehicleInfo[vehicleid][vPlate], "None", 32); if(VehicleInfo[vehicleid][vTimer] >= 0) { KillTimer(VehicleInfo[vehicleid][vTimer]); } VehicleInfo[vehicleid][vID] = 0; VehicleInfo[vehicleid][vOwnerID] = 0; VehicleInfo[vehicleid][vOwner] = 0; VehicleInfo[vehicleid][vModel] = 0; VehicleInfo[vehicleid][vPrice] = 0; VehicleInfo[vehicleid][vTickets] = 0; VehicleInfo[vehicleid][vLocked] = 0; VehicleInfo[vehicleid][vHealth] = 1000.0; VehicleInfo[vehicleid][vPosX] = 0.0; VehicleInfo[vehicleid][vPosY] = 0.0; VehicleInfo[vehicleid][vPosZ] = 0.0; VehicleInfo[vehicleid][vPosA] = 0.0; VehicleInfo[vehicleid][vColor1] = 0; VehicleInfo[vehicleid][vColor2] = 0; VehicleInfo[vehicleid][vPaintjob] = -1; VehicleInfo[vehicleid][vInterior] = 0; VehicleInfo[vehicleid][vWorld] = 0; VehicleInfo[vehicleid][vCash] = 0; VehicleInfo[vehicleid][vMaterials] = 0; VehicleInfo[vehicleid][vWeed] = 0; VehicleInfo[vehicleid][vCocaine] = 0; VehicleInfo[vehicleid][vMeth] = 0; VehicleInfo[vehicleid][vPainkillers] = 0; VehicleInfo[vehicleid][vWeapons][0] = 0; VehicleInfo[vehicleid][vWeapons][1] = 0; VehicleInfo[vehicleid][vWeapons][2] = 0; VehicleInfo[vehicleid][vHPAmmo] = 0; VehicleInfo[vehicleid][vPoisonAmmo] = 0; VehicleInfo[vehicleid][vFMJAmmo] = 0; VehicleInfo[vehicleid][vGang] = -1; VehicleInfo[vehicleid][vFactionType] = FACTION_NONE; VehicleInfo[vehicleid][vJob] = JOB_NONE; VehicleInfo[vehicleid][vObjects][0] = INVALID_OBJECT_ID; VehicleInfo[vehicleid][vObjects][1] = INVALID_OBJECT_ID; VehicleInfo[vehicleid][vTimer] = -1; for(new i = 0; i < 14; i ++) { VehicleInfo[vehicleid][vMods] = 0; } } // ReloadVehicle(vehicleid) { if(VehicleInfo[vehicleid][vPaintjob] >= 0) { ChangeVehiclePaintjob(vehicleid, VehicleInfo[vehicleid][vPaintjob]); } if(VehicleInfo[vehicleid][vNeon] && VehicleInfo[vehicleid][vNeonEnabled]) { ReloadVehicleNeon(vehicleid); } for(new i = 0; i < 14; i ++) { if(VehicleInfo[vehicleid][vMods] >= 1000) { AddVehicleComponent(vehicleid, VehicleInfo[vehicleid][vMods]); } } if(strcmp(VehicleInfo[vehicleid][vPlate], "None") != 0) { SetVehicleNumberPlate(vehicleid, VehicleInfo[vehicleid][vPlate]); ResyncVehicle(vehicleid); } LinkVehicleToInterior(vehicleid, VehicleInfo[vehicleid][vInterior]); SetVehicleVirtualWorld(vehicleid, VehicleInfo[vehicleid][vWorld]); SetVehicleHealth(vehicleid, VehicleInfo[vehicleid][vHealth]); SetVehicleParams(vehicleid, VEHICLE_DOORS, VehicleInfo[vehicleid][vLocked]); } voilà tout ce que je trouve pour les veh's..
  8. dans le script original j'ai tous supprimé les trucs genre: "DespawnTimer", "CarDespawn", j'ai tous supprimé..
  9. Il n'y a pas: "DespawnTimer" dans le script...
  10. salut, j'ai un gros bug en utilisant le script: Limitless Roleplay dès qu'on monte dans un véhicule, et qu'on roule 1 minutes il despawn et sa casse vraiment la tête pour les patrouilles etc.. https://github.com/thememester/Limitless-Roleplay Voilà le script pour ceux qui veulent m'aider ...