How to make teleport command -
James_Bourne - 15.08.2011
im search in ****** and on search
i don't find any i only find game modes

i wanna make an admin teleport command how do i do that?
Re: How to make teleport command -
Tigerbeast11 - 15.08.2011
pawn Код:
if (strcmp("/teleport", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,x,y,z);
SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
return 1;
}
return 0;
}
Replace the x,y,z with the co ordinates.
Re: How to make teleport command -
Darnell - 15.08.2011
You got positions ?
What command processor are you using ?
EDIT:
Tigerbeast11, explain him, he wants to learn how to.
Re: How to make teleport command -
Tigerbeast11 - 15.08.2011
Well, you need to go into debug and save the position of where you want to go. Use /save ingame. Then locate you GTA User Files and find a file name savedpositions.txt. You will need to use the x, y, z coordinates.
It will be something like this:
AddPlayerClass(104,2580.5696,-1491.9326,24.0021,277.8946,0,0,0,0,0,0); //
This is how it is:
AddPlayerClass(classid,x,y,z,facingangle,weapon1,a mmo,weapon2,ammo,weapon3,ammo);
You need the x y z and replace them in the command I gave you. I hope that explains it.
Re: How to make teleport command -
James_Bourne - 15.08.2011
Tiger where do i put it below? under the other admin commands?
Re: How to make teleport command -
Kingunit - 15.08.2011
Yes under the other commands.
Re: How to make teleport command -
James_Bourne - 15.08.2011
i got this warning:
Код:
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(3304) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Re: How to make teleport command -
Darnell - 15.08.2011
What line... ?
Re: How to make teleport command -
James_Bourne - 15.08.2011
3304
Код:
SetPlayerPos(playerid,2246.1997,-794.1442,314.2092,3.0406);
Re: How to make teleport command -
Darnell - 15.08.2011
pawn Код:
SetPlayerPos(playerid,2246.1997,-794.1442,314.2092);
Re: How to make teleport command -
James_Bourne - 15.08.2011
Thanks Darnell enjoy you're 9th Reputation :P
Tiger enjoy you're 1st reputation
Re: How to make teleport command -
Darnell - 15.08.2011
Thanks...you added an angle, the last position, and SetPlayerPos function requires X,Y,Z positions only.
Re: How to make teleport command -
James_Bourne - 15.08.2011
oh but when now when i go ingame it says unknown command?
Re: How to make teleport command -
Wesley221 - 15.08.2011
pawn Код:
if (strcmp("/teleport", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,x,y,z);
SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
} else return SendClientMessage(playerid, COLOR HERE, "You need to be admin to use this command");
return 1;
}
Re: How to make teleport command -
James_Bourne - 15.08.2011
well, it was nothing wrong with the code tiger gave me well, when i logged in as rcon admin it worked i could tele if im not logged in as rcon admin it dont work.
Re: How to make teleport command -
Darnell - 15.08.2011
This is the version without logging into rcon

.
pawn Код:
if (strcmp("/teleport", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,x,y,z);
SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
return 1;
}
Re: How to make teleport command -
James_Bourne - 15.08.2011
damn i think i've taken away somethign but i dont know what
Код:
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2350) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2353) : error 017: undefined symbol "ShowLoginScreen"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2356) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2359) : error 017: undefined symbol "ShowRegisterScreen"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2394) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2395) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2396) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2397) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2398) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2399) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2400) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2401) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2402) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2403) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2404) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2405) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2406) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2407) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2408) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2409) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2413) : error 004: function "ResetVariables" is not implemented
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2422) : error 004: function "RemoveRoadblock" is not implemented
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2445) : error 017: undefined symbol "PlayerName"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2475) : error 017: undefined symbol "PlayerObjectUpdate"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2619) : error 017: undefined symbol "StopLoopingAnim"
C:\Users\james\Documents\SFCRRPG\gamemodes\SFCRRPG.pwn(2625) : error 017: undefined symbol "PlayerName"
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
26 Errors.
AW: How to make teleport command -
samtey - 15.08.2011
Hmm, I don't think that this is a good way to make a teleport command! It will only teleport you there, where the co-ordinates are! So you have to make 1000000 tele commands!
Do you want one, which teleports other players to your position?
TO YOUR ERRORS:
this will fix the most of them:
PHP код:
stock PlayerName(playerid)
{
new pName[25];
GetPlayerName(playerid, pName, sizeof(pName));
return pName;
}
Re: How to make teleport command -
Darnell - 15.08.2011
You removed PlayerNam defenition, StopLoopingAnim, PlayerObjectUpdate, ResetVariables, RemoveRoadblock.
Re: How to make teleport command -
James_Bourne - 15.08.2011
its fixed Darnell you're code worked but when i did /adminarea ingame it said u need to be admin means i need to login on rcon i want that none rcon admins can use it what i mean is that admins who are not logged in on rcon can teleport with /adminarea