SA-MP Forums Archive
GotoPos Command - 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)
+--- Thread: GotoPos Command (/showthread.php?tid=400441)



GotoPos Command - Jason_Dealley - 18.12.2012

Hello!
I got this gotopos command but i need it in the normal sa-mp script ( no includes like ycmd):
PHP код:
YCMD:gotopos(playeridparams[], help)
{
        
SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
        
SetPlayerInterior(playeridint);
        return 
1;




Re: GotoPos Command - DiGiTaL_AnGeL - 18.12.2012

pawn Код:
if(strcmp(cmd, "/gotopos", true) == 0)
{
        SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
        SetPlayerInterior(playerid, int);
        return 1;
}
But I don't know why you don't want to choose YCMD. Anyway, the cmd made by you is wrong because you didn't defined the params and help unused :
pawn Код:
YCMD:gotopos(playerid, params[], help)
{
        #pragma unused params, help
        SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
        SetPlayerInterior(playerid, int);
        return 1;
}



Re: GotoPos Command - Jason_Dealley - 18.12.2012

Quote:
Originally Posted by DiGiTaL_AnGeL
Посмотреть сообщение
pawn Код:
if(strcmp(cmdt, "/gotopos", true) == 0)
{
        SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
        SetPlayerInterior(playerid, int);
        return 1;
}
But I don't know why you don't want to choose YCMD. Anyway, the cmd made by you is wrong because you didn't defined the params and help unused :
pawn Код:
YCMD:gotopos(playerid, params[], help)
{
        #pragma unused params, help
        SetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
        SetPlayerInterior(playerid, int);
        return 1;
}
Thanks i Guess im gunna spend my night reading the wiki.


Re: GotoPos Command - DiGiTaL_AnGeL - 18.12.2012

Quote:
Originally Posted by Jason_Dealley
Посмотреть сообщение
Thanks i Guess im gunna spend my night reading the wiki.
I'm glad I could help you. And thanks for the rep+