SA-MP Forums Archive
Teleport HELP - 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: Teleport HELP (/showthread.php?tid=94578)



Teleport HELP - Roxas_Nobody - 30.08.2009

ok when i put this Pawno in
#include <a_samp>

public OnGameModeInit()
{
UsePlayerPedAnims();

// All your spawns, cars, objects, etc.

return 1;
}
//colors

#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_BLACK 0x00000000
#define COLOR_DARKGREY 0x696969FF

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/mytp", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,1541.1716,-940.8367,41.8577);
SendClientMessage(playerid,0xFFFF00AA, "You have Teleported");
return 1;
}

I get this error
C:\Users\Owner\Documents\GTA SA\GTA Server creator\filterscripts\MyTP.pwn(36) : error 030: compound statement not closed at the end of file (started at line 30)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Help


Re: Teleport HELP - Roxas_Nobody - 30.08.2009

line 36 is after it says

35. return 1;
36. }


Re: Teleport HELP - Correlli - 30.08.2009

Correct:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if(strcmp("/mytp", cmdtext, true, 5) == 0)
  {
    SetPlayerPos(playerid,1541.1716,-940.8367,41.8577);
    SendClientMessage(playerid,0xFFFF00AA, "You have Teleported");
    return 1;
  }
  return 0;
}



Re: Teleport HELP - Roxas_Nobody - 30.08.2009

Thank you