GTAOnline.net

San Andreas Multiplayer (sa:mp) => Scripting SA-MP [Pawn center] => Discussion démarrée par: Thomas240 le 24 Octobre 2015, 12:34:28

Titre: teleportation
Posté par: Thomas240 le 24 Octobre 2015, 12:34:28
Bonjour / bonsoir vois la mon problème

C:\Users\Thomas\Desktop\Mes Documents\pawno\rp.pwn(272) : error 004: function "PlayerToPointStripped" is not implemented
C:\Users\Thomas\Desktop\Mes Documents\pawno\rp.pwn(275) : error 004: function "SetInterior" is not implemented
C:\Users\Thomas\Desktop\Mes Documents\pawno\rp.pwn(279) : error 004: function "PlayerToPointStripped" is not implemented
C:\Users\Thomas\Desktop\Mes Documents\pawno\rp.pwn(281) : error 004: function "SetInterior" is not implemented
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

forward CheckForWalkingTeleport(playerid);
forward SetInterior(playerid,interior);                 // Met un interieur a un joueur
forward PlayerToPointStripped(Float:radi, playerid, Float:x, Float:y, Float:z, Float:curx, Float:cury, Float:curz);

public CheckForWalkingTeleport(playerid)
{
if(PlayerToPointStripped(2.0, playerid,-1605.4127,711.4552,13.8672, cx,cy,cz))
{ //LSPD Entrance
GameTextForPlayer(playerid, "~w~Los Santos Police Departement", 3000, 1);
SetInterior(playerid, 6);
SetPlayerPos(playerid,246.7079,66.2239,1003.6406);
return 1;
}
if(PlayerToPointStripped(2.0, playerid,246.5325,62.4251,1003.6406, cx,cy,cz))
{ //LSPD Exit
SetInterior(playerid, 0);
SetPlayerPos(playerid,-1605.4127,711.4552,13.8672);
return 1;
}
return 1;
}

j'arrive pas a voire se que g oublier
Titre: Re : teleportation
Posté par: CarCrasher le 05 Novembre 2015, 12:40:59
T'as surtout oublié de nous donner le script de PlayerToPointStripped & SetInterior
Titre: Re : teleportation
Posté par: Ssk le 05 Novembre 2015, 13:06:23
Salut, utilise la fonction VectorSize (https://wiki.sa-mp.com/wiki/VectorSize) pour calculer la distance entre deux points.

Si tu ne comprends pas comment l'utiliser il y a un exemple dans la page de documentation de la fonction.