Vice City Multiplayer

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

Title: Teleport script problem :( please help
Post by: heton99 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

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