Üdv , ma elkészitettem az elsõ 0.3e scriptemet
Teleportok : Ls , SF,Lv
Készitette: ZzzzzZ
Készitési idõ : 20 perc
Tutorial Szerint készitettem
[gmod]Nem akarlak megbántani de túl sokat nem módosítottál rajt. Ezért az eredeti linket is ki kellett volna tenni. Mivel kiírtad hogy leírás szerint készítetted, ezért csak a leírás linkjét teszem ki.[/gmod]
http://forum.sa-mp.com/showthread.php?t=328267Kód:
#include <a_samp>
#include zcmd
new Text:teleportBox;
new Text:teleportLS;
new Text:teleportSF;
new Text:teleportLV;
public OnFilterScriptInit()
{
print(\"\\n--------------------------------------\");
print(\" Teleport Menû By ZzzzZ\");
print(\"--------------------------------------\\n\");
teleportBox = TextDrawCreate(320.000000, 143.000000, \"~n~Teleport Menû~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~_\");
TextDrawAlignment(teleportBox, 2);
TextDrawBackgroundColor(teleportBox, 255);
TextDrawFont(teleportBox, 2);
TextDrawLetterSize(teleportBox, 0.500000, 1.000000);
TextDrawColor(teleportBox, -1);
TextDrawSetOutline(teleportBox, 0);
TextDrawSetProportional(teleportBox, 1);
TextDrawSetShadow(teleportBox, 1);
TextDrawUseBox(teleportBox, 1);
TextDrawBoxColor(teleportBox, 255);
TextDrawTextSize(teleportBox, 45.000000, 115.000000);
teleportLS = TextDrawCreate(320.000000, 180.000000, \"Los Santos\");
TextDrawAlignment(teleportLS, 2);
TextDrawBackgroundColor(teleportLS, 255);
TextDrawFont(teleportLS, 2);
TextDrawLetterSize(teleportLS, 0.260000, 0.799999);
TextDrawColor(teleportLS, -1);
TextDrawSetOutline(teleportLS, 0);
TextDrawSetProportional(teleportLS, 1);
TextDrawSetShadow(teleportLS, 1);
teleportSF = TextDrawCreate(320.000000, 205.000000, \"San Fierro\");
TextDrawAlignment(teleportSF, 2);
TextDrawBackgroundColor(teleportSF, 255);
TextDrawFont(teleportSF, 2);
TextDrawLetterSize(teleportSF, 0.260000, 0.799999);
TextDrawColor(teleportSF, -1);
TextDrawSetOutline(teleportSF, 0);
TextDrawSetProportional(teleportSF, 1);
TextDrawSetShadow(teleportSF, 1);
teleportLV = TextDrawCreate(320.000000, 230.000000, \"Las Venturas\");
TextDrawAlignment(teleportLV, 2);
TextDrawBackgroundColor(teleportLV, 255);
TextDrawFont(teleportLV, 2);
TextDrawLetterSize(teleportLV, 0.260000, 0.799999);
TextDrawColor(teleportLV, -1);
TextDrawSetOutline(teleportLV, 0);
TextDrawSetProportional(teleportLV, 1);
TextDrawSetShadow(teleportLV, 1);
TextDrawSetSelectable(teleportBox, false);
TextDrawSetSelectable(teleportLS, true);
TextDrawSetSelectable(teleportSF, true);
TextDrawSetSelectable(teleportLV, true);
return 1;
}
public OnFilterScriptExit()
{
TextDrawDestroy(teleportBox);
TextDrawDestroy(teleportLS);
TextDrawDestroy(teleportSF);
TextDrawDestroy(teleportLV);
return 1;
}
CMD:tele(playerid,params[])
{
TextDrawShowForPlayer(playerid, teleportBox);
TextDrawShowForPlayer(playerid, teleportLS);
TextDrawShowForPlayer(playerid, teleportSF);
TextDrawShowForPlayer(playerid, teleportLV);
SelectTextDraw(playerid, 0x99FFFFAA);
return 1;
}
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(_:clickedid != INVALID_TEXT_DRAW)
{
if(clickedid == teleportLS)
{
SetPlayerPos(playerid, 2497.8572,-1663.6753,13.3476);
SetPlayerFacingAngle(playerid,83.2489);
}
else if(clickedid == teleportSF)
{
SetPlayerPos(playerid, -1971.4137,286.2423,35.1719);
SetPlayerFacingAngle(playerid, 84.2099);
}
else if(clickedid == teleportLV)
{
SetPlayerPos(playerid, 1958.2233,1342.1027,15.3746);
SetPlayerFacingAngle(playerid, 269.6651);
}
TextDrawHideForPlayer(playerid, teleportBox);
TextDrawHideForPlayer(playerid, teleportLS);
TextDrawHideForPlayer(playerid, teleportSF);
TextDrawHideForPlayer(playerid, teleportLV);
CancelSelectTextDraw(playerid);
}
return 0;
}
Kép:
http://kepfeltoltes.hu/120403/sa-mp-020_www.kepfeltoltes.hu_.png[/img]