-
Posts
488 -
Joined
-
Last visited
-
Days Won
1
Community Answers
-
Punct.'s post in Problema TextDraw Ceas was marked as the answer
Uite-te si tu pe poze.. dupa tine, ar trebui sa te ajut?
In orimul rand, implementeaza scriptul in gamemode. Nu cred ca ar trebui sa ai probleme, pentru ca nu e nimic complex.
La functia settime, lasi doar
public settime(playerid) { new string[50],hours,minutes,seconds; gettime(hours, minutes, seconds); format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds); TextDrawSetString(Time, string); } Astea le adaugi in functia PayDay new year,month,day; getdate(year, month, day); format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year); TextDrawSetString(Date, string);
-
Punct.'s post in Problemă /turfs was marked as the answer
Inlocuieste secventa de mai jos cu ce ti-am dat eu
if(TurfInfo[i][zOwned] == 6)
{
GangZoneShowForPlayer(playerid, Turfs[i], 0x25352999); // Corleone Family
}
acel 99 reprezinta transparenta teritoriului.
-
Punct.'s post in Problema register was marked as the answer
Edit: Am rezolvat. Am adaugat, ca atunci cand iti creeaza contul, sa-ti dea si un ID la cont, in functie de numarul de linii din tabela _players:
format(query, sizeof(query), "SELECT * FROM `_players` WHERE 1 = 1"); mysql_query(mysql, query); PlayerInfo[playerid][pID] = cache_get_row_count() + 1; if(strlen(inputtext) < 3) return ShowPlayerDialog(playerid, D_Register, DIALOG_STYLE_INPUT, "Register", "Parola trebuie sa contina cel putin 3 caractere.", "Register", "Kick"); mysql_format(mysql, query, sizeof(query), "INSERT INTO `_players`(`ID`, `Username`, `Password`, `IP`) VALUES ('%d', '%e', '%s', '%s')", PlayerInfo[playerid][pID], Name[playerid], inputtext, IP[playerid]); mysql_query(mysql, query);