kritikákat, és véleményeket kérek! :D[/quote]
A Script:
#include <a_samp>
new
Text:RTD[MAX_PLAYERS],
RandTimer[MAX_PLAYERS] // az utsó szöveg után ne írj vesszõt!
;
new TD[][] = {
\"~b~www.sa-mp.com\",
\"~y~www.sa-mp.com\",
\"~g~www.sa-mp.com\" // az utsó szöveg után ne írj vesszõt!
};
public OnFilterScriptInit() {
for(new i; i < MAX_PLAYERS; i++) {
RTD = TextDrawCreate(552.000000, 101.000000, \"www.sampforum.hu\");
TextDrawAlignment(RTD, 2);
TextDrawBackgroundColor(RTD, 255);
TextDrawFont(RTD, 2);
TextDrawLetterSize(RTD, 0.210000, 1.400000);
TextDrawColor(RTD, -1);
TextDrawSetOutline(RTD, 1);
TextDrawSetProportional(RTD, 1);
RandTimer = SetTimerEx(\"RandTD\", 3000, true, \"i\", i); // 3 másodpercenként vált
}
return 1;
}
public OnFilterScriptExit() {
for(new i; i < MAX_PLAYERS; i++) KillTimer(RandTimer);
return 1;
}
public OnPlayerSpawn(playerid) return TextDrawShowForPlayer(playerid, RTD[playerid]);
forward RandTD(playerid);
public RandTD(playerid) TextDrawSetString(RTD[playerid], TD[random(sizeof TD)]);
Utolsó verzió is elkészült! (v3)
A script annyiban változott, hogy PlayerText-es megoldást alkalmaztam a Textdrawnál.
A script:
#include <a_samp>
new
PlayerText:RTD,
RandTimer[MAX_PLAYERS] // az utsó szöveg után ne írj vesszõt!
;
new TD[][] = {
\"~b~www.sa-mp.com\",
\"~y~www.sa-mp.com\",
\"~g~www.sa-mp.com\" // az utsó szöveg után ne írj vesszõt!
};
public OnFilterScriptExit() {
for(new i; i < MAX_PLAYERS; i++) KillTimer(RandTimer);
return 1;
}
public OnPlayerConnect(playerid) {
RTD = CreatePlayerTextDraw(playerid, 552.000000, 101.000000, \"www.sampforum.hu\");
PlayerTextDrawAlignment(playerid, RTD, 2);
PlayerTextDrawBackgroundColor(playerid, RTD, 255);
PlayerTextDrawFont(playerid, RTD, 2);
PlayerTextDrawLetterSize(playerid, RTD, 0.210000, 1.400000);
PlayerTextDrawColor(playerid, RTD, -1);
PlayerTextDrawSetOutline(playerid, RTD, 1);
PlayerTextDrawSetProportional(playerid, RTD, 1);
PlayerTextDrawHide(playerid, RTD);
return 1;
}
public OnPlayerSpawn(playerid) {
PlayerTextDrawShow(playerid, RTD);
for(new player; player < MAX_PLAYERS; player++) SetTimerEx(\"RandTD\", 3000, true, \"i\", player);
return 1;
}
forward RandTD(playerid);
public RandTD(playerid) PlayerTextDrawSetString(playerid, RTD, TD[random(sizeof TD)]);