11.09.2014, 07:34
Hello , I made a Textdraw Teleport ! I compiled , no errors but when I enter InGame and type that command it is showin me what I did and when I press on Los Santos ( I tried just with LS ) doesn.t happenin nothing ! I made and Selectable text and.... look here Pastebin code :
What I made mistakes ! Help , thanks !
Код:
// This is a comment // uncomment the line below if you want to write a filterscript //#define FILTERSCRIPT #include <a_samp> new Text:LS; new Text:SF; new Text:LV; #if defined FILTERSCRIPT public OnFilterScriptInit() { TextDrawSetSelectable(teleportLS, true); // make textrdraw selectable TextDrawSetSelectable(teleportSF, true); // make textrdraw selectable TextDrawSetSelectable(teleportLV, true); // make textrdraw selectable print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); return 1; } #else #endif public OnGameModeInit() { SetGameModeText("Blank Script"); LS = TextDrawCreate(242 ,144 , "Los Santos"); TextDrawFont(LS , 1); TextDrawLetterSize(LS , 1, 7); TextDrawColor(LS , 0xff0000FF); TextDrawSetOutline(LS , false); TextDrawSetProportional(LS , true); TextDrawSetShadow(LS , 1); SF = TextDrawCreate(259 ,251 , "San Fierro"); TextDrawFont(SF , 2); TextDrawLetterSize(SF , 1, 7); TextDrawColor(SF , 0x3300ffFF); TextDrawSetOutline(SF , false); TextDrawSetProportional(SF , true); TextDrawSetShadow(SF , 1); LV = TextDrawCreate(243 ,348 , "Las Venturas"); TextDrawFont(LV , 3); TextDrawLetterSize(LV , 1, 7); TextDrawColor(LV , 0x00ff1eFF); TextDrawSetOutline(LV , false); TextDrawSetProportional(LV , true); TextDrawSetShadow(LV , 1); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/teleports", cmdtext, true, 10) == 0) { TextDrawShowForPlayer(playerid, LV); // Show the LV option TextDrawShowForPlayer(playerid, SF); // Show the SF option TextDrawShowForPlayer(playerid, LS); // Show the LS option SelectTextDraw(playerid, 0xA3B4C5FF); // make the textraws selectable return 1; } return 0; } public OnPlayerClickTextDraw(playerid, Text:clickedid) { if(clickedid == LS) { SendClientMessage(playerid, 0xFFFFFFAA, "You have been teleported to Los Santos!"); SetPlayerPos(playerid, 1515.7753,-1653.8003,13.7899); SetPlayerFacingAngle(playerid, 270.9400); CancelSelectTextDraw(playerid); } return 1; }
