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



Save Teleport? - Light_Man - 16.09.2011

How to saves teleports?


Re: Save Teleport? - doreto - 16.09.2011

you mean dialog wich teleport location?


Re: Save Teleport? - Light_Man - 16.09.2011

yes


Re: Save Teleport? - DeathTone - 16.09.2011

you can make your own, just /save where ever you wanna save a location and add it into a dialog, its very simple but im at school and cant make you a sample script atm


Re: Save Teleport? - doreto - 17.09.2011

PHP код:
#include <a_samp>
#include ZCMD
#define DIALOG_TELEPORT     (0)
CMD:teleports(playeridparams[])
{
    
ShowPlayerDialog(playerid,DIALOG_TELEPORT,DIALOG_STYLE_LIST,"Teleports","Las Vegas\nSan Friero\nLos Santos","Select","Exit");//you can change name and posstion what ever you like
    
return true;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_TELEPORT:
        {
            if(
response)
            switch(
listitem)
            {
                case 
0:SetPlayerPos(playerid,Float:x,Float:y,Float:z);// here change wich possition you wont [case 0 is lv]
                
case 1:SetPlayerPos(playerid,Float:x,Float:y,Float:z);// here change wich possition you wont [case 1 is sf]
                
case 2:SetPlayerPos(playerid,Float:x,Float:y,Float:z);// here change wich possition you wont [case 2 is ls] and ect...
            
}
        }
    }
    return 
1;




Re: Save Teleport? - Light_Man - 18.09.2011

Thanks