Teleport command ain't working
#1

This is my problem. The command ain't working.

pawn Код:
//deserteagle
    if(strcmp(cmdtext, "/deserteagle", true) == 0)
    {
    ResetPlayerWeapons();
    GivePlayerWeapon(playerid, 24, 1000);
      SetPlayerPos(-2672.5190,1410.3302,907.5703,272.2658,0,0,0,0,0,0);
      SetPlayerInterior(playerid, 3);
      return 1;
  }
Warnings:

Код:
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1034) : warning 202: number of arguments does not match definition
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1036) : warning 213: tag mismatch
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1036) : warning 202: number of arguments does not match definition
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1036) : warning 202: number of arguments does not match definition
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1036) : warning 202: number of arguments does not match definition
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1036) : warning 202: number of arguments does not match definition
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1036) : warning 202: number of arguments does not match definition
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1036) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Warnings.
I used /save loc in-game:
pawn Код:
AddPlayerClass(287,-2672.5190,1410.3302,907.5703,272.2658,0,0,0,0,0,0); // loc
Reply
#2

Set Player interior before teleporting and..
SetPlayer pos need only X,Y,Z !!
You have X,Y,Z,Angle,wep1,ammo1,wep2,ammo2,wep3,ammo3 -
It means that you need to remove
Код:
,272.2658,0,0,0,0,0,0
Full code
Код:
  //deserteagle
  if(strcmp(cmdtext, "/deserteagle", true) == 0)
  {
      SetPlayerInterior(playerid, 3);
	  SetPlayerPos(-2672.5190,1410.3302,907.5703);
      ResetPlayerWeapons();
      GivePlayerWeapon(playerid, 24, 1000);
	  return 1;
  }
Reply
#3

Quote:
Originally Posted by GaGlets®
Set Player interior before teleporting and..
SetPlayer pos need only X,Y,Z !!
You have X,Y,Z,Angle,wep1,ammo1,wep2,ammo2,wep3,ammo3 -
It means that you need to remove
Код:
,272.2658,0,0,0,0,0,0
Full code
Код:
  //deserteagle
  if(strcmp(cmdtext, "/deserteagle", true) == 0)
  {
      SetPlayerInterior(playerid, 3);
	  SetPlayerPos(-2672.5190,1410.3302,907.5703);
      ResetPlayerWeapons();
      GivePlayerWeapon(playerid, 24, 1000);
	  return 1;
  }
Код:
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1035) : warning 213: tag mismatch
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1035) : warning 202: number of arguments does not match definition
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1036) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Btw, your command isn't working.
Reply
#4

that's the right code

Код:
    if(strcmp(cmdtext, "/deserteagle", true) == 0)
	  {
      ResetPlayerWeapons(playerid); // added playerid
      GivePlayerWeapon(playerid, 24, 1000);
	  SetPlayerPos(playerid,-2672.5190,1410.3302,907.5703); // format should be SetPlayerPos(playerid,x,y,z);
	  SetPlayerInterior(playerid, 3);
	  return 1;
      }
________
LovelyWendie
Reply
#5

Quote:
Originally Posted by [AC
Etch ]
that's the right code

Код:
    if(strcmp(cmdtext, "/deserteagle", true) == 0)
	 {
      ResetPlayerWeapons(playerid); // added playerid
      GivePlayerWeapon(playerid, 24, 1000);
	  SetPlayerPos(playerid,-2672.5190,1410.3302,907.5703); // format should be SetPlayerPos(playerid,x,y,z);
	  SetPlayerInterior(playerid, 3);
	  return 1;
      }
ohh yes forgot playerid XDD
Reply
#6

Quote:
Originally Posted by [AC
Etch ]
that's the right code

Код:
    if(strcmp(cmdtext, "/deserteagle", true) == 0)
	 {
      ResetPlayerWeapons(playerid); // added playerid
      GivePlayerWeapon(playerid, 24, 1000);
	  SetPlayerPos(playerid,-2672.5190,1410.3302,907.5703); // format should be SetPlayerPos(playerid,x,y,z);
	  SetPlayerInterior(playerid, 3);
	  return 1;
      }
Thanks, this one works and now I know how to do it next time !
Reply
#7

Quote:
Originally Posted by DarkPhoenix
Quote:
Originally Posted by [AC
Etch ]
that's the right code

Код:
    if(strcmp(cmdtext, "/deserteagle", true) == 0)
	  {
      ResetPlayerWeapons(playerid); // added playerid
      GivePlayerWeapon(playerid, 24, 1000);
	  SetPlayerPos(playerid,-2672.5190,1410.3302,907.5703); // format should be SetPlayerPos(playerid,x,y,z);
	  SetPlayerInterior(playerid, 3);
	  return 1;
      }
urw
Thanks, this one works and now I know how to do it next time !
________
ANAL PLUG
Reply
#8

BTW - Rset and give weapons AFTER TELEPORT !! LOL
Reply
#9

Quote:
Originally Posted by GaGlets®
BTW - Rset and give weapons AFTER TELEPORT !! LOL
it doesnt matter lol , cause no one can do half of the command and don't teleport xD
________
Lamborghini Gallardo Specifications
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)