Jump to content

Recommended Posts

Posted

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

Posted

Folositor, nu e complicat, am facut si eu o functie de genul ..

TeleportPlayer( playerid, Float:X, Float:Y, Float:Z, Float:Angle, Interior, VirtualWorld, message[] )

:grin:

communitylogosml.png

94.23.120.101:7778

Posted

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

Posted

Nu ai nevoie de

#pragma library rPos
si de
native SetPlayerPosEx(playerid, Float:f_Px , Float:f_Py ,Float:f_Pz , interior = 0 , vw = 0 , message[] = '\0');

Chestia cu native se foloseste doar daca ai functia aia intrun plugin.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 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.