/save /load
#1

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
Reply
#2

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.

Reply
#3

thanks but can u help me with those lines?
Reply
#4

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
Reply
#5

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

or something!
Reply
#6

nice.ty
Reply
#7

?
Reply
#8

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)