SA-MP Forums Archive
A teleport command! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A teleport command! (/showthread.php?tid=92064)



A teleport command! - davaj - 18.08.2009

Hy all!
How i know to make a teleport command to this pos. 2687.509521 -1707.958984 1654.909912?
and the command is /air?
i tryed but the server dont make anything...here my vers.


public OnPlayerCommandText(playerid, cmdtext[])
if(!strcmp(cmdtext, "/air"))
{
SetPlayerPos(playerid, 2687.509521 -1707.958984 1654.909912);
GameTextForPlayer(playerid, "Ьdv. AirCityben!", 1, );
return 1;
}




Re: A teleport command! - Eazy_Efolife - 18.08.2009

Change:

Code:
public OnPlayerCommandText(playerid, cmdtext[])
if(!strcmp(cmdtext, "/air"))
  {
   SetPlayerPos(playerid, 2687.509521 -1707.958984 1654.909912);
   GameTextForPlayer(playerid, "Ьdv. AirCityben!", 1, );
    return 1;
  }
To

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/air"))
  {
   SetPlayerPos(playerid, 2687.509521 -1707.958984 1654.909912);
   GameTextForPlayer(playerid, "Ьdv. AirCityben!", 1, );
    return 1;
  }



Re: A teleport command! - davaj - 20.08.2009

dont work


Re: A teleport command! - Eazy_Efolife - 20.08.2009



Try This

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd,"/air",true)==0)
  {
   SetPlayerPos(playerid, 2687.509521 -1707.958984 1654.909912);
   GameTextForPlayer(playerid, "Ьdv. AirCityben!", 1, );
    return 1;
  }



Re: A teleport command! - G_ROW_Chez - 20.08.2009

Quote:
Originally Posted by Compton's Eazy E

Try This

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd,"/air",true)==0)
 {
   SetPlayerPos(playerid, 2687.509521 -1707.958984 1654.909912);
   GameTextForPlayer(playerid, "Ьdv. AirCityben!", 1, );
   return 1;
 }
nub >_<
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/air",true,4))
 {   
   GameTextForPlayer(playerid, "Ьdv. AirCityben!", 1, );
   return SetPlayerPos(playerid, 2687.509521, -1707.958984, 1654.909912);
 }



Re: A teleport command! - Eazy_Efolife - 20.08.2009

Quote:
Originally Posted by [RD
Chez ]
Quote:
Originally Posted by Compton's Eazy E

Try This

Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd,"/air",true)==0)
 {
   SetPlayerPos(playerid, 2687.509521 -1707.958984 1654.909912);
   GameTextForPlayer(playerid, "Ьdv. AirCityben!", 1, );
   return 1;
 }
nub >_<
Code:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/air",true,4))
 {   
   GameTextForPlayer(playerid, "Ьdv. AirCityben!", 1, );
   return SetPlayerPos(playerid, 2687.509521, -1707.958984, 1654.909912);
 }
Nub.... Thanks for the comment, It doesnt matter, if you change 0 to 4 it still works!