13.07.2012, 16:55
God, I'm such a big idiot.
I got it. I just had to put the script in OnGamemodeInit, and then on Cmd with TextDrawShowForPlayer.
For those who had the same problem , here is the solution :
But I still have one problem. How do I make it so when player clicks (LMB) it closes?
I got it. I just had to put the script in OnGamemodeInit, and then on Cmd with TextDrawShowForPlayer.
For those who had the same problem , here is the solution :
Код:
new Text:rules;
Код:
public OnGameModeInit() { rules =TextDrawCreate(320, 240, "xD"); TextDrawFont(rules, 2); TextDrawLetterSize(rules, 0.7, 4.9); TextDrawColor(rules, 0xB90000FF); TextDrawSetOutline(rules , 0); TextDrawSetProportional(rules , 1); TextDrawSetShadow(rules , 1); TextDrawUseBox(rules,1); TextDrawBoxColor(rules, 0x000000FF); TextDrawTextSize(rules, 0, 0); return 1; }
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/rules", cmdtext, true, 10) == 0) { TextDrawShowForPlayer(playerid, rules); return 1; } return 0; }