Szerző Téma: teleport  (Megtekintve 591 alkalommal)

teleport
« Dátum: 2013. Március 30. - 22:29:57 »
0 Show voters
Letöltöttem egy gammodot és ezt abba találtam és nem tom hogy lehetne velük teleporttott csinálni de ha tudnavalaki akkor azt nagyon megköszönném.
Create3DTextLabel(\"/DM2\", 0x33CCFFAA, -203.0458,-559.7894,1.6379, 40.0, 0, 0);
Create3DTextLabel(\"/circuit\", 0x33CCFFAA, 1409.1180,-1317.3937,11.2333, 40.0, 0, 0);
Create3DTextLabel(\"/lv-fb\", 0x33CCFFAA, 2154.9106,949.7018,10.8203, 40.0, 0, 0);
Create3DTextLabel(\"/lv\", 0x33CCFFAA, 2024.3549,1544.8292,10.8194, 40.0, 0, 0);
Create3DTextLabel(\"/sf\", 0x33CCFFAA, -1955.749389,266.408355,35.174148, 40.0, 0, 0);
Create3DTextLabel(\"/ls\", 0x33CCFFAA, 1480.7206,-1639.9985,14.1484, 40.0, 0, 0);
Create3DTextLabel(\"/aa\", 0x33CCFFAA, 391.8150,2531.8193,17.5544, 40.0, 0, 0);
Create3DTextLabel(\"/ls-fb\", 0x33CCFFAA, 1363.9747,-1285.4659,13.5469, 40.0, 0, 0);
Create3DTextLabel(\"/ls-air\", 0x33CCFFAA, 1925.1327,-2668.8264,13.5532, 40.0, 0, 0);
Create3DTextLabel(\"/lv-air\", 0x33CCFFAA, 1319.1317,1253.8339,10.8203, 40.0, 0, 0);
Create3DTextLabel(\"/sf-air\", 0x33CCFFAA, -1384.3500,-238.6237,14.1484, 40.0, 0, 0);
Create3DTextLabel(\"/derby\", 0x33CCFFAA, -2072.7932,-115.7107,35.3292, 40.0, 0, 0);
Create3DTextLabel(\"/jizzy\", 0x33CCFFAA, -2626.0608,1393.6145,7.1016, 40.0, 0, 0);
Create3DTextLabel(\"/drag1\", 0x33CCFFAA, -2682.0081,1289.0248,55.6646, 40.0, 0, 0);
Create3DTextLabel(\"/drag2\", 0x33CCFFAA, -1686.0159,-163.7319,17.0703, 40.0, 0, 0);
Create3DTextLabel(\"/drag3\", 0x33CCFFAA, 1477.6619,1187.3339,10.8203, 40.0, 0, 0);
Create3DTextLabel(\"/dm\", 0x33CCFFAA, -1285.7855,2521.3787,87.3499, 40.0, 0, 0);
Create3DTextLabel(\"/race\", 0x33CCFFAA, 3218.9551,-1933.0735,1.4000, 40.0, 0, 0);
Create3DTextLabel(\"/race2\", 0x33CCFFAA, 2845.3591,582.1521,6.5350, 40.0, 0, 0);

teleport
« Válasz #1 Dátum: 2013. Március 31. - 11:40:38 »
+1 Show voters
Helló! Megcsináltam neked!
Itt a kódos változata:
 
/*
* ---Teleport Script---
*          by: Edy (Zalakaka45)
*/
 
#include <a_samp>
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Teleport Script by Edy\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/dm2\", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,0.0,0.0,3.0); // A 0.0,0.0,3.0 az a koordinátája hogy hova tegye a játékost
return 1;
}
return 1;
}
/* Ha a többit is beszeretnéd tenni akkor csak kimásolod
if (strcmp(\"/dm2\", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,0.0,0.0,3.0);
return 1;
}
és átirod a kódot, majd a koordinátákat hogy hova rakja */

 
Itt a dialogos változata ha esetleg ez jobban tetszene:
 
/*
* ---Teleport Script---
*          by: Edy (Zalakaka45)
*/
#include <a_samp>
#define Teleportok 0
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Teleport Script by Edy\");
print(\"--------------------------------------\\n\");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(\"/teleportok\", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST,\"Teleportok\",\"DM2\\nCircuit\\nLV-FB\\nLV\\nSF\\nLS\\nAA\\nLS-FB\",\"Teleportálás\",\"Kilépés\"); // A LS-FB után folyathatod ugyan így.
return 1;
}
return 1;
}
public OnDialogResponse ( playerid, dialogid, response, listitem, inputtext [ ] )
{
if( dialogid == 0)
{
if( listitem == 0)
{
    SetPlayerPos(playerid,0.0,0.0,3.0); // a 0.0,0.0,3.0 a koordináták, azt te is áttod állitani
    return 1;
}
if( listitem == 1)
{
   SetPlayerPos(playerid,0.0,0.0,3.0);
   return 1;
}
return 1;
}
return 0;
}
/* Itt mindig rá megy a következõhöz +1,
a következõnél pl: if ( listitem == 1), következõnél if( listitem == 2) szal mindig rámegy egy +1 */

 
Volt tesztelve! Mûködik!
Remélem segitettem! Helló :)

teleport
« Válasz #2 Dátum: 2013. Március 31. - 12:06:38 »
0 Show voters
Nagyon szépen köszönöm :D :thumbsup:

teleport
« Válasz #3 Dátum: 2013. Március 31. - 12:15:15 »
0 Show voters
Kérlek ha a kérdésedre választ kaptál kattints a \"Téma Megoldva\"gombra.[/quote]

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal