31.07.2013, 14:33
pawn Код:
public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(clickedid == CommandHelp[3])
{
for(new i = 0; i < sizeof(TextDraw); i++)
{
TextDrawShowForPlayer(playerid, Generalcmds[i]);
TextDrawHideForPlayer(playerid, CommandHelp[i]);
}
}
else if(clickedid == CommandHelp[4])
{
SetPlayerPos(playerid, -1424.6083, -290.9622, 14.1484);
SetPlayerFacingAngle(playerid, 134.9570);
}
else if(clickedid == CommandHelp[5])
{
SetPlayerPos(playerid, 1688.7990, 1447.7753, 10.7675);
SetPlayerFacingAngle(playerid, 267.3902);
}
// Hide the textdraws after the player has teleport himself.
for(new i = 0; i < sizeof(TextDraw); i++)
{
TextDrawHideForPlayer(playerid, Generalcmds[i]);
//TextDrawHideForPlayer(playerid, CommandHelp[i]);
}
CancelSelectTextDraw(playerid);
return 1;
}
pawn Код:
CMD:cmdds(playerid)
{
for(new i = 0; i < sizeof(TextDraw); i++)
{
TextDrawShowForPlayer(playerid, CommandHelp[i]);
SelectTextDraw(playerid, RED);
}
return 1;
}
pawn Код:
CommandHelp[3] = TextDrawCreate(13.118605, 175.000091, "click here here ! :D");
TextDrawLetterSize(CommandHelp[3], 0.449999, 1.600000);
TextDrawAlignment(CommandHelp[3], 1);
TextDrawColor(CommandHelp[3], -1);
TextDrawSetShadow(CommandHelp[3], 0);
TextDrawSetOutline(CommandHelp[3], 1);
TextDrawBackgroundColor(CommandHelp[3], 51);
TextDrawFont(CommandHelp[3], 1);
TextDrawSetProportional(CommandHelp[3], 1);
pawn Код:
new Text: CommandHelp[9];