Bienvenue, Invité. Veuillez vous connecter ou vous inscrire.
Avez-vous perdu votre courriel d'activation?
Connexion avec identifiant, mot de passe et durée de la session

 
avancée

254730 Messages dans 14037 Fils de discussion- par 6623 Membres - Dernier membre: Magicien

24 Mai 2012 à 14:23:45
GTAOnline.frSan Andreas MultiplayerScripting SA-MP [Pawn center] (Modérateurs: S!m, Xartrick)ajouter les nom des voiture quand on rentre dedans
Pages: [1]   Bas de page
Imprimer
Auteur Fil de discussion: ajouter les nom des voiture quand on rentre dedans  (Lu 272 fois)
0 Membres et 1 Invité sur ce fil de discussion.
Eduardo_Latino
Hors ligne Hors ligne

Criminel entrainé
*

Messages: 62


« le: 02 Août 2009 à 18:46:05 »

bonjour voila j'aimerais ajouter ceci :


Code:
new Nom_Des_Vehicules[][] =
{
    "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
"Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus", "Voodoo",
"Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto",
"Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection", "Hunter", "Premier",
"Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks",
"Hotknife", "Trailer 1", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo",
"RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo", "Seasparrow",
    "Pizzaboy", "Tram", "Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed",
"Yankee", "Caddy", "Solair", "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio",
"Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic", "Sanchez", "Sparrow",
"Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350",
"Walton", "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage",
"Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood",
"Jetmax", "Hotring", "Sandking", "Blista Compact", "Police Maverick", "Boxvillde",
"Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B", "Bloodring Banger",
"Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle",
"Cropduster", "Stunt", "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer",
"Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck",
    "Fortune", "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine",
"Feltzer", "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
"Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo", "Cargobob",
"Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite", "Windsor", "Monster",
"Monster", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance", "RC Tiger",
"Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart",
"Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley",
"Stafford", "BF-400", "News Van", "Tug", "Trailer 3", "Emperor", "Wayfarer", "Euros",
"Hotdog", "Club", "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch",
"LSPD Car", "SFPD Car", "LVPD Car", "Police Ranger", "Picador", "S.W.A.T Tank", "Alpha",
"Phoenix", "Glendale", "Sadler", "Luggage Trailer 1", "Luggage Trailer 2", "Stairs Trailer",
    "Boxville", "Utility Trailer 1", "Utility Trailer 2"
};


mais quand je l'ajoute sa me donne un warning :

Code:
C:\Documents and Settings\Administrateur.15C8C0122FFA4EF\Bureau\samp02Xserver\gamemodes\larp.pwn(45530) : warning 203: symbol is never used: "Nom_Des_Vehicules"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

Header size:           9148 bytes
Code size:          1672304 bytes
Data size:          3705892 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4982 cells (19928 bytes)
Total requirements: 5403728 bytes

1 Warning.


Merci d'avance bonne fin de journée
Journalisée
cristab
Hors ligne Hors ligne


Admin V.I.P
GTAOnline Legend
*

Messages: 7333


« Répondre #1 le: 02 Août 2009 à 18:48:31 »

il faut mettre le code qui va avec ^^


Citation
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new VID = GetPlayerVehicleID(playerid);
    new MOD = GetVehicleModel(playerid);
    new string[128];
   
    if(newstate == PLAYER_STATE_DRIVER)
   {
       format(string, sizeof(string), "~g~%s",Nom_Des_Vehicules[GetVehicleModel(VID)-400]);
       GameTextForPlayer(playerid,string,3500,1);
      
   }
   return 1;
}
Journalisée

Eduardo_Latino
Hors ligne Hors ligne

Criminel entrainé
*

Messages: 62


« Répondre #2 le: 02 Août 2009 à 18:49:48 »

oui mais le quelle ?  Triste
Journalisée
S!m
Hors ligne Hors ligne


Moderateur
GTAOnline Fan Boy
*

Messages: 2260


« Répondre #3 le: 02 Août 2009 à 18:51:25 »

Salut,

cristab, tu n'as pas besoin de récupérer le véhicule en question, il t'es déjà donné via les paramètres de la callback,

de plus cette callback est appelée au moment où le joueur appuie sur entrée, donc il ne se trouve dans aucun véhicule à se moment...

++Sim++
Journalisée





Eduardo_Latino
Hors ligne Hors ligne

Criminel entrainé
*

Messages: 62


« Répondre #4 le: 02 Août 2009 à 19:03:34 »

sa me donne sa

Code:
C:\Documents and Settings\Administrateur.15C8C0122FFA4EF\Bureau\samp02Xserver\gamemodes\larp.pwn(822) : error 001: expected token: "}", but found ";"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Code:
new Nom_Des_Vehicules[][] = {
{
    "Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
"Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus", "Voodoo",
"Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam", "Esperanto",
"Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection", "Hunter", "Premier",
"Enforcer", "Securicar", "Banshee", "Predator", "Bus", "Rhino", "Barracks",
"Hotknife", "Trailer 1", "Previon", "Coach", "Cabbie", "Stallion", "Rumpo",
"RC Bandit", "Romero", "Packer", "Monster", "Admiral", "Squalo", "Seasparrow",
    "Pizzaboy", "Tram", "Trailer 2", "Turismo", "Speeder", "Reefer", "Tropic", "Flatbed",
"Yankee", "Caddy", "Solair", "Berkley's RC Van", "Skimmer", "PCJ-600", "Faggio",
"Freeway", "RC Baron", "RC Raider", "Glendale", "Oceanic", "Sanchez", "Sparrow",
"Patriot", "Quad", "Coastguard", "Dinghy", "Hermes", "Sabre", "Rustler", "ZR-350",
"Walton", "Regina", "Comet", "BMX", "Burrito", "Camper", "Marquis", "Baggage",
"Dozer", "Maverick", "News Chopper", "Rancher", "FBI Rancher", "Virgo", "Greenwood",
"Jetmax", "Hotring", "Sandking", "Blista Compact", "Police Maverick", "Boxvillde",
"Benson", "Mesa", "RC Goblin", "Hotring Racer A", "Hotring Racer B", "Bloodring Banger",
"Rancher", "Super GT", "Elegant", "Journey", "Bike", "Mountain Bike", "Beagle",
"Cropduster", "Stunt", "Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer",
"Shamal", "Hydra", "FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck",
    "Fortune", "Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine",
"Feltzer", "Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
"Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo", "Cargobob",
"Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite", "Windsor", "Monster",
"Monster", "Uranus", "Jester", "Sultan", "Stratum", "Elegy", "Raindance", "RC Tiger",
"Flash", "Tahoma", "Savanna", "Bandito", "Freight Flat", "Streak Carriage", "Kart",
"Mower", "Dune", "Sweeper", "Broadway", "Tornado", "AT-400", "DFT-30", "Huntley",
"Stafford", "BF-400", "News Van", "Tug", "Trailer 3", "Emperor", "Wayfarer", "Euros",
"Hotdog", "Club", "Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch",
"LSPD Car", "SFPD Car", "LVPD Car", "Police Ranger", "Picador", "S.W.A.T Tank", "Alpha",
"Phoenix", "Glendale", "Sadler", "Luggage Trailer 1", "Luggage Trailer 2", "Stairs Trailer",
    "Boxville", "Utility Trailer 1", "Utility Trailer 2"
(822) };



 Triste Triste
Journalisée
cristab
Hors ligne Hors ligne


Admin V.I.P
GTAOnline Legend
*

Messages: 7333


« Répondre #5 le: 02 Août 2009 à 19:24:10 »

Citation
"Boxville", "Utility Trailer 1", "Utility Trailer 2"
(822) };

le rouge est a supprimer
Journalisée

Eduardo_Latino
Hors ligne Hors ligne

Criminel entrainé
*

Messages: 62


« Répondre #6 le: 02 Août 2009 à 19:43:19 »

non mais le (822) c'est quoi qui la mit pour que vous voyer c'est quelle la ligne ^^

EDIT : j'ai trouver Sourire Merci pour ton aide cristab
« Dernière édition: 02 Août 2009 à 19:45:41 par Eduardo_Latino » Journalisée
futenesie
Hors ligne Hors ligne


Grand Banditisme
*

pro en => HTML-CSS-FLASH-JAVA-SDK

Messages: 71






« Répondre #7 le: 03 Août 2009 à 22:02:51 »

pourquoi tu rajoute pas un afficheur de km/h comme sa tu verais le mph, le km/h, altitude si tu souhaite le metre avec, le nom du vehicule et son etat sa serait mieu que juste afficher le nom du vehicule ^^ apres c'est toi qui voit chacun c'est gout ^^
Journalisée

Pages: [1]   Haut de page
Imprimer
Aller à:  

Theme créé par padexx et modifié par GTAOnline.fr
Page générée en 0.132 secondes avec 23 requêtes.
Forum GTAOnline.fr 2.0 | Design par : Lalu et GtaManiac
Merci a toute la communaute pour son support !
Copyright © 2004-2012 - GTAOnline.fr | GTAPro.com | Contact