Author Topic: Teleport script problem :( please help  (Read 2702 times)

0 Members and 1 Guest are viewing this topic.

Offline heton99

  • Street Thug
  • *
  • Posts: 10
    • View Profile
Teleport script problem :( please help
« on: February 21, 2010, 12:39:19 pm »
Hello, I create script (teleport) to airport:

    else if (strcmp(cmd, "!airport", true) == 0)
   {
   tmp = strtok(cmdtext, idx);
      if (!strlen(tmp)) {
       SetPlayerPos(playerid,x,y,z -1284.8098,-867.6508,14.8680);
            SendClientMessage(playerid, COLOR_GREEN, "Welcome to Airport!!!");
      }
      return 1;
   }


and i have compiler error:
D:\Gta Vice City\gamemodes\stunt.pwn(271) : warning 213: tag mismatch
Pawn compiler 3.0.3367         Copyright (c) 1997-2005, ITB CompuPhase


1 Warning.

PLEASE HELP :( sry for me english.
SetPlayerPos(playerid,x,y,z -1284.8098,-867.6508,14.8680); <-- THIS IS LINE 271

« Last Edit: February 21, 2010, 12:43:52 pm by heton99 »

Offline Boss

  • VC:MP Beta Tester (inactive)
  • Made Man
  • *
  • Posts: 229
  • Boss
    • View Profile
    • TDH Clan Site
Re: Teleport script problem :( please help
« Reply #1 on: February 21, 2010, 01:05:14 pm »
You do not (and should not) use x,y,z variables anywhere. Plus, you are using SetPlayerPos function wrongly. Refer to http://tdhclan.ru/wiki/index.php/Functions for a full list of functions and their parameters.

And here is a proper code:
Code: [Select]
else if (strcmp(cmd, "!airport", true) == 0){
    SetPlayerPos(playerid,-1284.8098,-867.6508,14.8680,0.0,0);
    SendClientMessage(playerid, COLOR_GREEN, "Welcome to Airport!!!");
    return 1;
}

Offline heton99

  • Street Thug
  • *
  • Posts: 10
    • View Profile
Re: Teleport script problem :( please help
« Reply #2 on: February 21, 2010, 01:17:06 pm »
very thx man :)