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



/save /load - SnakeEater - 15.02.2008

how you do '/save' or /s and than the position saves? and than /load to go to the saved location ? anyone got filterscript or how i do myself


Re: /save /load - [LDT]LuxurY - 15.02.2008

Quote:
Originally Posted by SnakeEater
how you do '/save' or /s and than the position saves? and than /load to go to the saved location ? anyone got filterscript or how i do myself
use array.

like

new pos[MAX_PLAYERS][3];

//save
GetPlayerPos(playerid,pos[playerid][0],pos[playerid][1],pos[playerid][2]);

//load
SetPlayerPos(playerid,pos[playerid][0],pos[playerid][1],pos[playerid][2]);

and then make commands.




Re: /save /load - SnakeEater - 15.02.2008

thanks but can u help me with those lines?


Re: /save /load - diamondo25 - 15.02.2008

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[]){
    new pos[MAX_PLAYERS][3];
    if(strcmp(cmdtext, "/save", true) == 0)
    {
        new str[256], playername[256];
        SendClientMessage(playerid, GREEN, "Saved your coordinates!");
        GetPlayerPos(playerid,pos[playerid][0],pos[playerid][1],pos[playerid][2]);
        GetPlayerName(playerid,playername,256);
        format(str, 256, "%s saved his coordinates.",playername);
        print(str);
        return 1;
    }
    if(strcmp(cmdtext, "/load", true) == 0)
    {
        new str[256], playername[256];
        SendClientMessage(playerid, GREEN, "Loaded your coordinates!");
        SetPlayerPos(playerid,pos[playerid][0],pos[playerid][1],pos[playerid][2]);
        GetPlayerName(playerid,playername,256);
        format(str, 256, "%s loaded his coordinates.",playername);
        print(str);
        return 1;
    }
}
here


Re: /save /load - System13 - 04.03.2008

i think u needa define it.. like
posx = 0.0;
posy = 0.0;
posz = 0.0;
zangle = 0.0'

or something!


Re: /save /load - TeC-9 - 02.08.2009

nice.ty


Re: /save /load - nuriel8833 - 03.08.2009

?


Re: /save /load - TeC-9 - 03.08.2009

can u do instead /load to change comand in to a buton like num+?


Re: /save /load - speedruntrainer - 03.08.2009

I ******d and I found this very good topic. it includes the /spos and /lpos function. But I can't find the orginal one. This is just a printpage
http://forum.sa-mp.com/index.php?act...e;topic=2868.0