GTAOnline.net

San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Nikko™ le 27 Mai 2008, 18:25:12

Titre: SetPlayerWorldBounds et auto repair
Posté par: Nikko™ le 27 Mai 2008, 18:25:12
bonjour tout le mondeuh ^^ :)

Voila jai 2 petites choses a demander:
jai créé un dm avec des objets mais on peu quand meme arriver a le quitter, jaimerai savoir comment onfigurer ca:
SetPlayerWorldBounds(playerid,-1246.8126,-1467.0779,516.2305,486.0336);

Et comment créé un auto repair ???
cest a dire que si le vehicule arrive a 150hp, il soit remit a 1000 .... :)

merky bien.  :)

++
nikko
Titre: Re : SetPlayerWorldBounds et auto repair
Posté par: NatiVe™ le 27 Mai 2008, 18:34:33
Créer un timer !

forward Vhealth();
SetTimer("Vhealth", 2000, 1);
public Vhealth()
{
for (new i=0 ; i<MAX_PLAYERS ; i++)
{
if(IsPlayerInAnyVhicle(i)
{
SetVehicleHealth(GetPlayerVehicleID(i), 1000);
}
}
return 1;
}

Wala !

NV.

Titre: Re : SetPlayerWorldBounds et auto repair
Posté par: Bayshore le 27 Mai 2008, 18:35:50
http://wiki.sa-mp.com/wiki/SetPlayerWorldBounds

Suffit de lire la doc :happy

++
Alexandre
Titre: Re : SetPlayerWorldBounds et auto repair
Posté par: Nikko™ le 27 Mai 2008, 19:07:33
Mercky mais jaimerai savoir si cest possible d'activer le mode auto repair que dans un dm ???

++
nikko
Titre: Re : SetPlayerWorldBounds et auto repair
Posté par: NatiVe™ le 27 Mai 2008, 19:10:43
Oui avec un SetTimerEx quand il entre dedan et un KillTimer quand il en sort

NV.

Titre: Re : SetPlayerWorldBounds et auto repair
Posté par: Nikko™ le 27 Mai 2008, 19:18:34
Ok ok chef ! ^^
merci  :cheers

Juste, comment on le désactive le worldbound ??

++
nikko