SA-MP Forums Archive
3 problems gates and textdraws - 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: 3 problems gates and textdraws (/showthread.php?tid=340478)



3 problems gates and textdraws - PaYkOK - 07.05.2012

Ok the first problem is a gate , it wont open or close here's the code :

Top of script :
pawn Код:
new adgate;
In GamemodeInit

pawn Код:
adgate = CreateObject(2990,1208.5999755859,-2036.5999755859,71.900001525879,0,0,90);
And the bottom of the script (OnPlayerText)

pawn Код:
if(strcmp(cmdtext, "/ogate", true) == 0)
    {
    if (IsPlayerAdmin(playerid))
    {
        MoveObject(adgate, 1208.5999755859, -2045.5999755859, 71.900001525879, 0, 0, 90);
        SendClientMessage(playerid, COLOR_YELLOW, "Opening the gate!");
    }
    else
    {
    SendClientMessage(playerid, COLOR_RED, "You are not an admin!!");
    }
    return 1;
    }
Thats the open command i didn't add the close command yet.

The second problem are the textdraws , they won't show

top of script :
pawn Код:
new Text:web;
new Text:serverver;
in gamemodeinit :
pawn Код:
web = TextDrawCreate(8 ,456 , "MyWebSite");
    TextDrawFont(web , 2);
    TextDrawLetterSize(web , 0.6, 4.2);
    TextDrawColor(web , 0xffffffFF);
    TextDrawSetOutline(web , false);
    TextDrawSetProportional(web , false);
    TextDrawSetShadow(web , 1);

    serverver = TextDrawCreate(515 ,458 , "ServerVerison");
    TextDrawFont(serverver , 1);
    TextDrawLetterSize(serverver , 0.4, 2.8000000000000003);
    TextDrawColor(serverver , 0xffffffFF);
    TextDrawSetOutline(serverver , false);
    TextDrawSetProportional(serverver , false);
    TextDrawSetShadow(serverver , 3);
i already tired adding TextDrawShowForAll in ongamemodeinic and TextDrawShowForPlayer on player spawn didnt work ...


Re: 3 problems gates and textdraws - [KHK]Khalid - 07.05.2012

Well on your first problem these codes have to be under OnPlayerCommandText not OnPlayerText

On second problem, post OnPlayerSpawn codes here.