Jump to content

SetPlayerPosEx


Rimmon

Recommended Posts

Functia care am facut-o se numeste SetPlayerPosEx

  • SetPlayerPosEx(playerid, Float:f_Px , Float:f_Py ,Float:f_Pz , interior = 0 , vw = 0 , message[])

playerid - playerul caruia ii seteaza noua pozitie

f_Px - Coordonata X a pozitiei noi

f_Py - Coordonata Y a pozitiei noi

f_Pz - Coordonata Z a pozitiei noi

interior - interiorul care se va seta la executarea comenzii/actiunii

vw - virtual world-ul care se va seta la executarea comenzii/actiunii

message[] - Mesajul care i se va trimite playerului

Codul

stock SetPlayerPosEx(playerid, Float:f_Px , Float:f_Py ,Float:f_Pz , interior = 0 , vw = 0 , message[])
{
        new
              s_msg[ 256 ] ;
	SetPlayerPos(playerid,f_Px , f_Py ,f_Pz);
	SetPlayerInterior(playerid,interior);
	SetPlayerVirtualWorld(playerid,vw);
	format ( s_msg , 256 ,"{00FFFF}TELEPORT:{FF8800}%s" , message ) ;
	SendClientMessage( playerid , -1 , s_msg );
	return 1;
}
Cum se foloseste? Ex:
CMD:aa(playerid,params[])
{
     SetPlayerPosEx(playerid,402.7567, 2446.6157, 15.9866,0,0,"Bine ai venit la Old Airport");
     return 1;
}

Ce face acest script?

Acest script iti usureaza munca cu mult..

In loc sa folositi

SetPlayerPos

SetPlayerInterior

SetPlayerVirtualWorld

SendClientMessage

4 linii in total,cu acest cod le faci pe toate intr-o singura linie

It's not a big deal , but is my work xD

Massari e curva mea

Link to comment
Share on other sites

L-am facut in inc..uitel..

#if defined _rPos_included
	#endinput
#endif
#define _rPos_included
#pragma library rPos

#include <a_samp>


new
	s_msg [ 256 ] ;
stock SetPlayerPosEx(playerid, Float:f_Px , Float:f_Py ,Float:f_Pz , interior = 0 , vw = 0 , message[] = '\0')
{
	SetPlayerPos(playerid,f_Px , f_Py ,f_Pz);
	SetPlayerInterior(playerid,interior);
	SetPlayerVirtualWorld(playerid,vw);
	if(message[ 0 ] != '\0')
	{
		format ( s_msg , 256 ,"{00FFFF}TELEPORT:{FF8800}%s" , message ) ;
		SendClientMessage( playerid , -1 , s_msg );
	}
	return 1;
}
native SetPlayerPosEx(playerid, Float:f_Px , Float:f_Py ,Float:f_Pz , interior = 0 , vw = 0 , message[] = '\0');
Il pun in gm
#include <rPos>
totul bine.. deschid consola merge.. dar cand fac si codul la o comanda SetPlayerPoseEx(playerid,x,y,z etc dau compile totul merge perfect.. si cand deschid consola nu imi citeste GM imi da asta in consola
[19:55:28] Script[gamemodes/RST.amx]: Run time error 19: "File or function is not found"
[19:55:28] Number of vehicle models: 4

Massari e curva mea

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.