Jump to content

Adaugare cod pentru functii native ?


salexm93

Recommended Posts

Salutare,

Cred ca pentru ceva mai simplu poti folosi ca exemplu urmatorul cod

FunctieNouaSetPlayerPos(playerid, Float:x,Float:y,Float:z)
{ 
	PlayerPosX [playerid]=x,
	PlayerPosY[playerid]=y,
	PlayerPosZ[playerid]=z;
    return SetPlayerPos(playerid, x,y,z);
}
#undef SetPlayerPos 
#define SetPlayerPos FunctieNouaSetPlayerPos

Daca adaugi codul la inceputul gamemodeului, sau cel putin deasupra tuturor functiilor de SetPlayerPos prezente in gamemode, atunci ar trebui ca la fiecare teleport al playerului prin functie nativa SetPlayerPos, cele 3 variabile sa fie setate conform coordonatelor, mai departe faci ce vrei pentru alte functii.

  • Upvote 1

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • Mister locked this topic
Guest
This topic is now closed to further replies.
×
×
  • 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.