CallLocalFunction FR

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 04:24, 7 January 2013
Connor Mead (Talk | contribs)

← Previous diff
Revision as of 03:11, 4 February 2014
Connor Mead (Talk | contribs)

Next diff →
Line 1: Line 1:
 +{{ScriptingFR}}
 +
 +{{Description|Appelle une fonction publique du script.}}
 +
 +{{note2FR|CallLocalFunction fait planter le serveur si il envoie une chaîne vide.}}
 +
 +{{ParametersFR|const function[], const format[], {Float,_}:...}}
 +{{Param|function[]|Le nom de la fonction publique.}}
 +{{Param|format[]|Les variables à utiliser.}}
 +{{Param|{Float,_}:...|Les paramètres à utiliser.g}}
 +
 +{{ReturnsFR|La valeur retournée par la fonction appelée.}}
 +
 +{{FormatStrings2FR}}
 +
 +<pawn>
 +forward callMe(const string[]);
 +public callMe(const string[])
 +{
 + printf("callMe> %s", string);
 + return 1;
 +}
 +
 +CallLocalFunction("callMe", "s", "COUCOU TOI!!11");
 +</pawn>
 +<pawn>
 +CallLocalFunction("SendClientMessageToAll", "is", -1, "Salut tout le monde!");
 +</pawn>
 +
 +{{RelatedFunctionsFR}}
 +{{CallRemoteFunction_FR}}
 +
[[Category:Scripting Functions FR]] [[Category:Scripting Functions FR]]
 +
 +[[en:CallLocalFunction]]
 +[[de:CallLocalFunction]]
 +[[ru:CallLocalFunction]]

Revision as of 03:11, 4 February 2014



Description:

Appelle une fonction publique du script.


Image:32px-Circle-style-warning.png

Note
Importante

CallLocalFunction fait planter le serveur si il envoie une chaîne vide.



Paramètres:
(const function[], const format[], {Float,_}:...)
function[]Le nom de la fonction publique.
format[]Les variables à utiliser.
{Float,_}:...Les paramètres à utiliser.g


Retourne:

La valeur retournée par la fonction appelée.


Syntaxe de formatage

Lettre Ce à quoi ça correspond
c Insert un seul caractère
d, i Insert un chiffe/nombre
x Insert un nombre hexadécimal.
f Insert un nombre flottant (nombre à virgule).
s Insert une chaîne.

Ces valeurs doivent êtres utilisées exactement dans le même ordre que les paramètres concernés.

forward callMe(const string[]);
public  callMe(const string[])
{
    printf("callMe> %s", string);
    return 1;
}
 
CallLocalFunction("callMe", "s", "COUCOU TOI!!11");
CallLocalFunction("SendClientMessageToAll", "is", -1, "Salut tout le monde!");

Fonctions Relatives

Les fonctions suivantes peuvent être utiles car elles sont indirectement ou directement liées a cette fonction.

In other languages