Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <getk>
- main() { print("hueuheuh"); }
- new Text:Relogio[2][MAX_PLAYERS];
- new string[1028];
- new Text:velo[MAX_PLAYERS];
- new Text:lata[MAX_PLAYERS];
- new Text:coins[MAX_PLAYERS];
- #define Function::%1(%2)\
- forward %1(%2);\
- public %1(%2)
- public OnFilterScriptInit() {
- SetTimer("Coins", 2000, 1);
- SetTimer("Re", 1000, 1);
- SetTimer("veh", 100, 1);
- return 1;
- }
- public OnPlayerConnect(playerid) {
- Relogio[0][playerid] = TextDrawCreate(525.000000, 5.000000, "--");
- Relogio[1][playerid]= TextDrawCreate(550.000000, 23.000000, "--");
- TextDrawAlignment(Relogio[0][playerid], 0);
- TextDrawAlignment(Relogio[1][playerid], 0);
- TextDrawBackgroundColor(Relogio[0][playerid], 0x000000FF);
- TextDrawBackgroundColor(Relogio[1][playerid], 0x000000FF);
- TextDrawFont(Relogio[0][playerid], 2);
- TextDrawLetterSize(Relogio[0][playerid], 0.399999, 2.000000);
- TextDrawFont(Relogio[1][playerid], 2);
- TextDrawLetterSize(Relogio[1][playerid], 0.399999, 2.000000);
- TextDrawColor(Relogio[0][playerid], 0xFFFFFFFF);
- TextDrawColor(Relogio[1][playerid], 0xFFFFFFFF);
- TextDrawSetProportional(Relogio[0][playerid], 1);
- TextDrawSetProportional(Relogio[1][playerid], 1);
- TextDrawSetShadow(Relogio[0][playerid], 1);
- TextDrawSetShadow(Relogio[1][playerid], 1);
- TextDrawSetOutline(Relogio[0][playerid], 1);
- TextDrawSetOutline(Relogio[1][playerid], 1);
- TextDrawShowForAll(Relogio[0][playerid]);
- TextDrawShowForAll(Relogio[1][playerid]);
- coins[playerid] = TextDrawCreate(497.000000, 103.000000, "--");
- TextDrawBackgroundColor(coins[playerid], 255);
- TextDrawFont(coins[playerid], 1);
- TextDrawLetterSize(coins[playerid], 0.500000, 1.000000);
- TextDrawColor(coins[playerid], 16711935);
- TextDrawSetOutline(coins[playerid], 0);
- TextDrawSetProportional(coins[playerid], 1);
- TextDrawSetShadow(coins[playerid], 1);
- velo[playerid] = TextDrawCreate(462.000000, 377.000000, "--");
- TextDrawBackgroundColor(velo[playerid], 65535);
- TextDrawFont(velo[playerid], 1);
- TextDrawLetterSize(velo[playerid], 0.500000, 2.899999);
- TextDrawColor(velo[playerid], -1);
- TextDrawSetOutline(velo[playerid], 1);
- TextDrawSetProportional(velo[playerid], 1);
- lata[playerid] = TextDrawCreate(465.000000, 407.000000, "--");
- TextDrawBackgroundColor(lata[playerid], -16711681);
- TextDrawFont(lata[playerid], 2);
- TextDrawLetterSize(lata[playerid], 0.500000, 2.299999);
- TextDrawColor(lata[playerid], -65281);
- TextDrawSetOutline(lata[playerid], 0);
- TextDrawSetProportional(lata[playerid], 1);
- TextDrawSetShadow(lata[playerid], 1);
- return 1;
- }
- public OnPlayerDisconnect(playerid) {
- TextDrawDestroy(Relogio[0][playerid]);
- TextDrawDestroy(Relogio[1][playerid]);
- TextDrawHideForAll(Relogio[0][playerid]);
- TextDrawHideForAll(Relogio[1][playerid]);
- TextDrawDestroy(coins[playerid]);
- TextDrawHideForAll(coins[playerid]);
- TextDrawHideForAll(velo[playerid]);
- TextDrawDestroy(velo[playerid]);
- TextDrawHideForAll(lata[playerid]);
- TextDrawDestroy(lata[playerid]);
- return 1;
- }
- public OnFilterScriptExit() {
- return 1;
- }
- Function::Coins(playerid) {
- new str[1028];
- format(str, sizeof str, "Coins: Desativado!");
- TextDrawSetString(coins[playerid], str);
- TextDrawShowForPlayer(playerid, coins[playerid]);
- return 1;
- }
- Function::veh(playerid) {
- new str[1028];
- format(str, sizeof str, "Velocidade: %d", PVDP(playerid));
- TextDrawSetString(velo[playerid], str);
- new strr[1028];
- new Float:lataria;
- GetVehicleHealth(GetPlayerVehicleID(playerid), lataria);
- format(strr, sizeof strr, "Lataria: %0.0f%", lataria);
- TextDrawSetString(lata[playerid], strr);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, Relogio[0][playerid]);
- TextDrawShowForPlayer(playerid, Relogio[1][playerid]);
- TextDrawShowForPlayer(playerid, coins[playerid]);
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid) {
- TextDrawHideForPlayer(playerid, lata[playerid]);
- TextDrawHideForPlayer(playerid, velo[playerid]);
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) {
- if(ispassenger) { }
- else {
- TextDrawShowForPlayer(playerid, lata[playerid]);
- TextDrawShowForPlayer(playerid, velo[playerid]);
- }
- return 1;
- }
- public OnPlayerDeath(playerid)
- {
- TextDrawHideForPlayer(playerid, lata[playerid]);
- TextDrawHideForPlayer(playerid, velo[playerid]);
- TextDrawHideForPlayer(playerid, coins[playerid]);
- TextDrawHideForPlayer(playerid, Relogio[0][playerid]);
- TextDrawHideForPlayer(playerid, Relogio[1][playerid]);
- return 1;
- }
- Function::Re(playerid) {
- new str[1028],
- ano,
- mes,
- dia,
- horas,
- minutos,
- segundos;
- getdate(ano, mes, dia);
- gettime(horas, minutos, segundos);
- format(str, sizeof str, "%02d/%02d/%d", dia, mes, ano);
- TextDrawSetString(Relogio[0][playerid], str);
- format(string, sizeof string, "%02d:%02d:%02d", horas, minutos, segundos);
- TextDrawSetString(Relogio[1][playerid], string);
- TextDrawShowForPlayer(playerid, Relogio[0][playerid]);
- TextDrawShowForPlayer(playerid, Relogio[1][playerid]);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment