Vice City Multiplayer

VC:MP => mIRC/pawn Scripting => Topic started by: heton99 on February 21, 2010, 10:39:19 AM

Title: Teleport script problem :( please help
Post by: heton99 on February 21, 2010, 10:39:19 AM
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

Title: Re: Teleport script problem :( please help
Post by: Boss on February 21, 2010, 11:05:14 AM
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:

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;
}
Title: Re: Teleport script problem :( please help
Post by: heton99 on February 21, 2010, 11:17:06 AM
very thx man :)