GTAOnline.net
San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Spaggiari le 09 Mars 2010, 18:31:15
-
Salut,
Sur wiki-samp j'ai vu cette fonction ci appelé ' IsPlayerInCircle '
Parameters:
(playerid, Float:x, Float:y, radius)
playerid The playerid you want to query
Float:x The x value of the center of the circle
Float:y The y value of the center of the circle
radius The radius of the circle
Returns 1 if they are in the area, 0 if they aren't
Simplement quand je fait COMPILE, j'ai une erreur comme quoi ce n'est pas défini...Mais alors comment définir un truc dans ce genre ?
Merci,
Spaggiari
-
il me semble qu'en 0.3 il y a deja cette fonction sous un autre nom
-
IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z)
playerid The ID of the player you want to check the point range of.
Float:range The furthest distance the player can be to be in range.
Float:x The X coordinate of the point to check the range to.
Float:y The Y coordinate of the point to check the range to.
Float:z The Z coordinate of the point to check the range to.
Returns 1 if the player is in range of the point, otherwise 0.
-
Merci mais IsPlayerInRangeOfPoint ca fait pareil que le cercle ? J'ai juste à mettre mes coordonées dans chaque endroit et c'est bon ?
edit : ca me fait pareil avec SetPlayerSkillLevel, il me met undefinided symbol ... je le defini comment ?
-
telecharge les new inc
-
ils sont sur le fofo samp ? je go voir
edit : je doit mettre quoi comme mots clés / rechercher ou ?
-
Up svp,
merci :)
-
Salut,
Tu peux les telecharger à comme si tu télécharger un nouveau serveur, dans la section download du site sa:mp
Jawitt.
-
Merci mais y'a pas les seuls truc c'est samp windows et linux et SAMP 0.3..
-
Bah oui tu télécharge sa, et ta les inc dedans..
-
Mais je l'ai déjà telechargé ca :blink Sinon j'aurais pas pu faire mon serveur ^^'
-
Les includes sont dedans, faut que tu remplace !!
-
Desolé mais je comprend pas :/
-
Ben non j'ai telechargé le server pour SAMP 3, puis j'ai commencé à construire mon GameMod...
Je doit ecrire #include IsPlayerInCircle en haut ?
-
Les include ne sont que pour inclure un fichier..
Plus précisement..
------
Va sur http://sa-mp.com (http://sa-mp.com) dans la section Download.
Télécharge les fichiers WINDOWS.
Quand le téléchargement est fini, remplace tous les fichiers qui sont dans le fichier téléchargé par ceux que tu as..
-
Mais ca sert à quoi puisque je l'ai déjà ca..
J'ecrit #include {Nom du include ou y'a mon truc} ou pas ?
Et comment je sais lequel c'est.. ?
-
IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z)
playerid The ID of the player you want to check the point range of.
Float:range The furthest distance the player can be to be in range.
Float:x The X coordinate of the point to check the range to.
Float:y The Y coordinate of the point to check the range to.
Float:z The Z coordinate of the point to check the range to.
Returns 1 if the player is in range of the point, otherwise 0.
il oublie vite ce qu'on lui repond
-
Merci, en effet ca marche j'ai plus d'erreur !
Mais... Quand je fait mon truc InGame que ce soit à 5 ou à 50 métre il ouvre quand même la porte de mon garage =/ donc est ce que le chiffre à mettre au radius est en métre ou kilométre :P ?
Edition :
J'ai un deuxiéme petit soucis je t'en parlerais sur MSN si tu as du temps ;D
-
sa m'etonne qu'il ai les bonne inc http://wiki.sa-mp.com/wiki/IsPlayerInRangeOfPoint (http://wiki.sa-mp.com/wiki/IsPlayerInRangeOfPoint)
-
Pas bien compris ton message Cristab :-\
-
c'est pourtant simple tu demande de l'aide pour une fonction nommer IsPlayerInCircle on te repond qu'elle est deja integrer a samp sous ce nom IsPlayerInRangeOfPoint
-
Ha, donc je remplace IsPlayerInCircle par IsPlayerInRangeOfPoint ?
-
up :-[
-
Oui mais faut aussi mettre les bon paramètres !
-
Et pour ca je doit faire comment ?
-
J'y arrive toujours pas.. :/
-
si tu nous montrais ce serais plus simple
-
Oui tu as raison ^^ Ton voici ce que j'ai mis dans mon GM :
// Coulisser la porte Garage Pologne
IsPlayerInCircle(playerid,3627.0535,-9728.9033,9);
if (strcmp(cmdtext, "/coulisser", true)==0)
{
{
ApplyAnimation(playerid,"AIRPORT","thrw_barl_thrw",4.1,0,1,1,1,1);
ApplyAnimation(playerid,"AIRPORT","thrw_barl_thrw",4.1,0,1,1,1,1);
MoveObject(PortePologne,3627.41796875, -9732.4384765625, 18.728450775146, 1);//On bouge l'objet
SendClientMessage(playerid, COLOR_BLEU_CLAIR,"La porte a coulissée, mais elle ne tardera pas à se refermer.");//Onaverti
}
return 1;
}
et la porte réussi à se coulisser alors que je suis beaucoup plus loin..
-
if (strcmp(cmdtext, "/coulisser", true)==0)
{
IsPlayerInRangeOfPoint(playerid,9, 3627.0535,-9728.9033)
{
ApplyAnimation(playerid,"AIRPORT","thrw_barl_thrw",4.1,0,1,1,1,1);
ApplyAnimation(playerid,"AIRPORT","thrw_barl_thrw",4.1,0,1,1,1,1);
MoveObject(PortePologne,3627.41796875, -9732.4384765625, 18.728450775146, 1);//On bouge l'objet
SendClientMessage(playerid, COLOR_BLEU_CLAIR,"La porte a coulissée, mais elle ne tardera pas à se refermer.");//Onaverti
}
return 1;
}
-
Merci de ton aide mais quel #define pour definir IsPlayerInRangeOfPoint ?
Y'a pas un truc pour savoir justement lesquels c'est histoire de plus vous faire chier avec ca ?
-
aucune define c'est une fonction dans samp 0.3
-
Mais alors pourquoi elle ne s'active pas ?
-
je ne sais pas look mon screen
http://moe.mabul.org/up/moe/2010/03/22/img-200450gkpu5.png.html (http://moe.mabul.org/up/moe/2010/03/22/img-200450gkpu5.png.html)
-
Bah merde maintenant la commande marche plus du tout ^^
-
attention 9 c'est petit tente de mettre 20 a la place 20!= a 20 metres mais a 20 pas
-
Ok je le ferais mais certaines de mes autres commandes ne marchent plus, je m'en suis apercu en testant donc ca viendrait de ca ?
edit : j'ai test, ca me met encore unknow command :/
-
Merci Gzume, mais 1error..
C:\Program Files\Rockstar Games\SERVEUR MOT DE PASSE\gamemodes\lvdm.pwn(414) : error 017: undefined symbol "IsPlayerInRangeOfPoint"
-
je suis sur que tu compile avec les ancienne include
-
Bah je vais retélécharger..Aprés j'ai juste à copier/coller mes FS et mon GM ?
-
Wooh merci, plus d'erreur (enfin j'avais un truc deja defini 'is player NPC' donc j'ai supr) et puis aprés je /coulisser mais ca me met unknow command, ca fait comme certains de mes autres commandes alors qu'elles marchaient avant :/
Double post
Résolu !
Grâce à Varda sur MSN :)