Search

open.mp forum

RegisterLogin

Discussion

General
Chat
Tech
Life
Art
Programming
open.mp
Development Updates
Questions and Suggestions
SA-MP
General Discussions
Videos and Screenshots
Support
Pawn Scripting
Tutorials
Releases
Plugins
Libraries
Filterscripts
Gamemodes
Maps
Advertisements
Other languages
Spanish/Espa?ol
Programaci?n
Discusi?n GTA SA Multijugador
Mods
Offtopic
Juegos
Portuguese/Portugu?s
Russian/???????
Italian/Italiano
Dutch/Nederlands
German/Deutsch
Romanian/Rom?na
Ex-Yu
Polish/Polski
Og?lne
Serwery
Skryptowanie
Filmiki i zdjecia
Lithuanian/Lietuvi?kas
French/Fran?ais
Hungarian/Magyar
Hindi/Urdu
Turkish
Other
Internal
Team
Hidden
Archived

Library

 Collections Links Members Roles

How i can add this to my command?

Hi, how can I make it so that only I can teleport to people who are in the same virtual world and cannot if the virtual world is...

ID
d6ouivnilegovhg7bno0
author
nicolas_belic's avatar

Nicolas_Belic

@nicolas_belic


View profile
Copy link
  Report member
started
Feb 18, 2021
replies
0
participating
No

scroll to top

powered by storyden

Login
Discussion
Pawn Scripting
How i can add this to my command?
nicolas_belic's avatar

Nicolas_Belic

@nicolas_belic


View profile
Copy link
  Report member
• 5y
Pawn Scripting

How i can add this to my command?

pawn

Hi, how can I make it so that only I can teleport to people who are in the same virtual world and cannot if the virtual world is different?





CMD:goto(playerid, params[]) {

? ? 

? ? ? ? if (!sscanf(params, "d", params[0])) {

? ? ? ? ? ? if (IsPlayerConnected(params[0])) {

? ? ? ? ? ? ? ? if(GetPlayerVirtualWorld(params[0]) == GetPlayerVirtualWorld (playerid)) else SendClientMessage(playerid, -1, "Nope");

? ? ? ? ? ? ? ? new Float: p_x,Float: p_y,Float: p_z;

? ? ? ? ? ? ? ? GetPlayerPos(params[0], p_x, p_y, p_z);

? ? ? ? ? ? ? ? new interior = GetPlayerInterior(params[0]);

? ? ? ? ? ? ? ? new vw = GetPlayerVirtualWorld(params[0]);

? ? ? ? ? ? ? ? SetPlayerPos(playerid, p_x, p_y, p_z);

? ? ? ? ? ? ? ? SetPlayerInterior(playerid, interior);

? ? ? ? ? ? ? ? SetPlayerVirtualWorld(playerid, vw);

? ? ? ? ? ? ? ? return SendClientMessage(playerid, -1, "Teleported.");

? ? ? ? ? ? } else SendClientMessage(playerid, -1, "Player not found.");

? ? ? ? } else SendClientMessage(playerid, -1, "/goto [playerid]");

? ? ? ? return 1;

}









Correct me please

0 likes0 replies

    Please sign up or log in to reply