CreateObject FR
From SA-MP Wiki
(Difference between revisions)
Revision as of 03:59, 5 January 2013 Connor Mead (Talk | contribs) ← Previous diff |
Revision as of 12:51, 20 January 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
- | [[Category:Scripting Functions FR]] | + | {{ScriptingFR}} |
+ | |||
+ | {{Description|Crée un objet.}} | ||
+ | |||
+ | {{ParametersFR|modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance}} | ||
+ | {{Param|modelid|Le [[Game_Object_ID_List|modèle d'objet]] que vous voulez utiliser.}} | ||
+ | {{Param|Float:X|Les coordonnées X où créer l'objet.}} | ||
+ | {{Param|Float:Y|Les coordonnées Y où créer l'objet.}} | ||
+ | {{Param|Float:Z|Les coordonnées Z où créer l'objet.}} | ||
+ | {{Param|Float:rX|L'axe de rotation X de l'objet.}} | ||
+ | {{Param|Float:rY|L'axe de rotation Y de l'objet.}} | ||
+ | {{Param|Float:rZ|L'axe de rotation Z de l'objet.}} | ||
+ | {{Param|Float:DrawDistance|(optionnel) La distance maximale à laquelle l'objet sera vu. 0.0 mettra la distance de rendu à celle par défaut.}} | ||
+ | |||
+ | {{ReturnsFR|L'ID de l'objet qui a été crée.}} | ||
+ | |||
+ | <pawn> | ||
+ | public OnGameModeInit() | ||
+ | { | ||
+ | CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0); //La distance de rendu sera celle par défaut | ||
+ | CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0, 250.0); //250.0 | ||
+ | CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0, 50000.0); //50000.0, Le maximum | ||
+ | return 1; | ||
+ | } | ||
+ | </pawn> | ||
+ | |||
+ | {{note|Les objets émettant de la lumières (néons, gyrophare) ayant une rotation plus haute que '''16.26 degrés''' (ou -16.26) sur '''l'axe Y ou Z''' arretereront d'émettre de la lumière. Cette effet concerne aussi les objets attachés à d'autres objets, joueurs ou véhicules. Si un objet émettant de la lumière est attachée à une voiture et que la voiture est retournée à plus de 16.26 degrés, l'objet arretera d'émettre de la lumière. Ceci est directemetn causé par GTA:SA et n'est pas causé par un bug de SA-MP.}} | ||
+ | |||
+ | |||
+ | {{RelatedFunctionsFR}} | ||
+ | *[[DestroyObject_FR|DestroyObject]] | ||
+ | *[[MoveObject_FR|MoveObject]] | ||
+ | *[[StopObject_FR|StopObject]] | ||
+ | *[[SetObjectPos_FR|SetObjectPos]] | ||
+ | *[[SetObjectRot_FR|SetObjectRot]] | ||
+ | *[[GetObjectPos_FR|GetObjectPos]] | ||
+ | *[[GetObjectRot_FR|GetObjectRot]] | ||
+ | *[[AttachObjectToPlayer_FR|AttachObjectToPlayer]] | ||
+ | *[[SetObjectMaterialText_FR|SetObjectMaterialText]] | ||
+ | *[[SetObjectMaterial_FR|SetObjectMaterial]] | ||
+ | |||
+ | *[[CreatePlayerObject_FR|CreatePlayerObject]] | ||
+ | *[[DestroyPlayerObject_FR|DestroyPlayerObject]] | ||
+ | *[[IsValidPlayerObject_FR|IsValidPlayerObject]] | ||
+ | *[[MovePlayerObject_FR|MovePlayerObject]] | ||
+ | *[[StopPlayerObject_FR|StopPlayerObject]] | ||
+ | *[[SetPlayerObjectPos_FR|SetPlayerObjectPos]] | ||
+ | *[[SetPlayerObjectRot_FR|SetPlayerObjectRot]] | ||
+ | *[[GetPlayerObjectPos_FR|GetPlayerObjectPos]] | ||
+ | *[[GetPlayerObjectRot_FR|GetPlayerObjectRot]] | ||
+ | *[[AttachPlayerObjectToPlayer_FR|AttachPlayerObjectToPlayer]] | ||
+ | *[[SetPlayerObjectMaterialText_FR|SetPlayerObjectMaterialText]] | ||
+ | *[[SetPlayerObjectMaterial_FR|SetPlayerObjectMaterial]] | ||
+ | |||
+ | [[Category:Scripting Functions FR] |
Revision as of 12:51, 20 January 2014
Page d'Accueil | Les Fonctions | Les Callbacks | Les bases du Scripting | Plugins de Serveur | Tutoriaux
Ne prenez pas en compte les FR dans les noms
Description:
Crée un objet.
(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance)
modelid | Le modèle d'objet que vous voulez utiliser. |
Float:X | Les coordonnées X où créer l'objet. |
Float:Y | Les coordonnées Y où créer l'objet. |
Float:Z | Les coordonnées Z où créer l'objet. |
Float:rX | L'axe de rotation X de l'objet. |
Float:rY | L'axe de rotation Y de l'objet. |
Float:rZ | L'axe de rotation Z de l'objet. |
Float:DrawDistance | (optionnel) La distance maximale à laquelle l'objet sera vu. 0.0 mettra la distance de rendu à celle par défaut. |
Retourne:
L'ID de l'objet qui a été crée.
public OnGameModeInit() { CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0); //La distance de rendu sera celle par défaut CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0, 250.0); //250.0 CreateObject(2587, 2001.195679, 1547.113892, 14.283400, 0.0, 0.0, 96.0, 50000.0); //50000.0, Le maximum return 1; }
Fonctions Relatives
Les fonctions suivantes peuvent être utiles car elles sont indirectement ou directement liées a cette fonction.
- DestroyObject
- MoveObject
- StopObject
- SetObjectPos
- SetObjectRot
- GetObjectPos
- GetObjectRot
- AttachObjectToPlayer
- SetObjectMaterialText
- SetObjectMaterial
- CreatePlayerObject
- DestroyPlayerObject
- IsValidPlayerObject
- MovePlayerObject
- StopPlayerObject
- SetPlayerObjectPos
- SetPlayerObjectRot
- GetPlayerObjectPos
- GetPlayerObjectRot
- AttachPlayerObjectToPlayer
- SetPlayerObjectMaterialText
- SetPlayerObjectMaterial
[[Category:Scripting Functions FR]