#include <a_samp>
#pragma tabsize 0
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:txtTimeDisp;
new hour, minute;
new horadkn[32];
forward UpdateTime();
//--------------------------------------------------
public UpdateTime()
{
gettime(hour, minute);
format(horadkn,32,"%02d:%02d",hour,minute);
TextDrawSetString(txtTimeDisp,horadkn);
SetWorldTime(hour);
new x=0;
while(x!=MAX_PLAYERS) {
if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
SetPlayerTime(x,hour,minute);
}
x++;
}
}
//--------------------------------------------------
public OnFilterScriptInit()
{
Textdraw0 = TextDrawCreate(541.000000, 405.000000, "Lunaticos");
TextDrawBackgroundColor(Textdraw0, 0xF6AD00AA);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.559998, 2.599998);
TextDrawColor(Textdraw0, 0xF6AD00AA);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
Textdraw1 = TextDrawCreate(584.000000, 408.000000, "Brasil");
TextDrawBackgroundColor(Textdraw1, 0xFFFF00AA);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.509998, 2.299998);
TextDrawColor(Textdraw1, 0xFFFF00AA);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
Textdraw2 = TextDrawCreate(518.000000, 425.000000, "");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.209999, 1.100000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
txtTimeDisp = TextDrawCreate(558.000000, 436.000000,"00:00");
TextDrawBackgroundColor(txtTimeDisp, 255);
TextDrawFont(txtTimeDisp, 1);
TextDrawLetterSize(txtTimeDisp, 0.209999, 1.000000);
TextDrawColor(txtTimeDisp, -1);
TextDrawSetOutline(txtTimeDisp, 0);
TextDrawSetProportional(txtTimeDisp, 1);
TextDrawSetShadow(txtTimeDisp, 1);
UpdateTime();
SetTimer("UpdateTime",1000 * 60,1);
return 1;
}
//--------------------------------------------------
public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid,txtTimeDisp);
return 1;
}
//--------------------------------------------------
//--------------------------------------------------
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid,txtTimeDisp);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
gettime(hour, minute);
SetPlayerTime(playerid,hour,minute);
return 1;
}
//--------------------------------------------------
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawDestroy(Textdraw1);
TextDrawHideForAll(Textdraw2);
TextDrawDestroy(Textdraw2);
TextDrawHideForAll(Textdraw3);
TextDrawDestroy(Textdraw3);
return 1;
}
public OnPlayerConnect(playerid)
{
gettime(hour, minute);
SetPlayerTime(playerid,hour,minute);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
return 1;
}
Segue cуdigo.
pawn Код:
|
D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(577) : error 021: symbol already defined: "hour" D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(577) : error 021: symbol already defined: "minute" D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17870) : error 021: symbol already defined: "SetTimer" D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17876) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17901) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17909) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17917) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17927) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17946) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17955) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17964) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17973) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17982) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(17991) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18027) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18036) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18046) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18056) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18066) D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18066) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18076) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18086) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18096) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18108) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18121) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18134) : error 010: invalid function or declaration D:\Documentos\Desktop\GAMEMOIDE\BPC\Gamemodes\BPC.pwn(18142) : error 010: invalid function or declaration
#include <a_samp>
#pragma tabsize 0
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:txtTimeDisp;
new hour, minute;
new horadkn[32];
forward UpdateTime();
//--------------------------------------------------
public UpdateTime()
{
gettime(hour, minute);
format(horadkn,32,"%02d:%02d",hour,minute);
TextDrawSetString(txtTimeDisp,horadkn);
SetWorldTime(hour);
new x=0;
while(x!=MAX_PLAYERS) {
if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE) {
SetPlayerTime(x,hour,minute);
}
x++;
}
}
//--------------------------------------------------
public OnFilterScriptInit()
{
Textdraw0 = TextDrawCreate(541.000000, 405.000000, "Base");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.559998, 2.599998);
TextDrawColor(Textdraw0, -7601921);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
Textdraw1 = TextDrawCreate(584.000000, 408.000000, "Oi");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.509998, 2.299998);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
Textdraw2 = TextDrawCreate(518.000000, 425.000000, "www.baseoi.forumeiros.com");
TextDrawBackgroundColor(Textdraw2, 255);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.209999, 1.100000);
TextDrawColor(Textdraw2, -1);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
txtTimeDisp = TextDrawCreate(558.000000, 436.000000,"00:00");
TextDrawBackgroundColor(txtTimeDisp, 255);
TextDrawFont(txtTimeDisp, 1);
TextDrawLetterSize(txtTimeDisp, 0.209999, 1.000000);
TextDrawColor(txtTimeDisp, -1);
TextDrawSetOutline(txtTimeDisp, 0);
TextDrawSetProportional(txtTimeDisp, 1);
TextDrawSetShadow(txtTimeDisp, 1);
UpdateTime();
SetTimer("UpdateTime",1000 * 60,1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, Textdraw0);
TextDrawShowForPlayer(i, Textdraw1);
TextDrawShowForPlayer(i, Textdraw2);
TextDrawShowForPlayer(i, Textdraw3);
}
}
return 1;
}
//--------------------------------------------------
public OnPlayerDeath(playerid, killerid, reason)
{
TextDrawHideForPlayer(playerid,txtTimeDisp);
return 1;
}
//--------------------------------------------------
//--------------------------------------------------
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid,txtTimeDisp);
gettime(hour, minute);
SetPlayerTime(playerid,hour,minute);
return 1;
}
//--------------------------------------------------
public OnFilterScriptExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawDestroy(Textdraw1);
TextDrawHideForAll(Textdraw2);
TextDrawDestroy(Textdraw2);
TextDrawHideForAll(Textdraw3);
TextDrawDestroy(Textdraw3);
return 1;
}
public OnPlayerConnect(playerid)
{
gettime(hour, minute);
SetPlayerTime(playerid,hour,minute);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
return 1;
}
new Text:Textdraw0;
new Text:Textdraw1;
public OnGameModeInit()
{
Textdraw0 = TextDrawCreate(283.000000, 401.000000, "Forum");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 3);
TextDrawLetterSize(Textdraw0, 0.380000, 2.500000);
TextDrawColor(Textdraw0, -1);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetSelectable(Textdraw0, 1);
Textdraw1 = TextDrawCreate(283.000000, 366.000000, "Brasil~r~Live~w~HarD");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 3);
TextDrawLetterSize(Textdraw1, 0.559999, 4.299998);
TextDrawColor(Textdraw1, -1);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetSelectable(Textdraw1, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, Textdraw0);
TextDrawShowForPlayer(i, Textdraw1);
}
}
return 1;
}
public OnGameModeExit()
{
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawDestroy(Textdraw1);
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
return 1;
}