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



Help - laser50 - 17.05.2009

help please,

how can i put this in my script:

if(!strcmp(cmdtext,"/tele",true)) {
SetPlayerPos(playerid, 1459,443, -1073,91, 15);
SetPlayerAngle(playerid, 0);
return 1;
}

i get 3 errors then and here they are:
C:\Documents and Settings\SAMP pc\Desktop\server\pawno\new.pwn(140) : warning 202: number of arguments does not match definition
C:\Documents and Settings\SAMP pc\Desktop\server\pawno\new.pwn(140) : warning 202: number of arguments does not match definition
C:\Documents and Settings\SAMP pc\Desktop\server\pawno\new.pwn(141) : error 017: undefined symbol "SetPlayerAngle"
C:\Documents and Settings\SAMP pc\Desktop\server\pawno\new.pwn(145) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

the Setplayer angle is wrong, how to fix?


Re: Help - Backwardsman97 - 17.05.2009

pawn Код:
if(!strcmp(cmdtext,"/tele",true))
{
  SetPlayerPos(playerid, 1459, 443, -1073);//Only has 4 arguments (although that's probably the wrong coords)
  SetPlayerFacingAngle(playerid, 0);//Actually SetPlayerFacingAngle
  return 1;
}



Re: Help - Correlli - 17.05.2009

pawn Код:
1459,443
You're doing wrong.

pawn Код:
1459.443
This is right.


Re: Help - Badger(new) - 17.05.2009

and put what backwardsman97 said under OnPlayerCommandText, thus it should look like this:

pawn Код:
public OnPlayerCommandText(playerid,cmdtext[])
{
  if(!strcmp(cmdtext,"/tele",true))
  {
    SetPlayerPos(playerid, 1459, 443, -1073);//Only has 4 arguments
    SetPlayerFacingAngle(playerid, 0);//Actually SetPlayerFacingAngle
    return 1;
  }
  return 0;
}