16.10.2012, 23:25 
	
	
	
		Nгo invalidou nada do que eu disse. rs
	
	
	
	
| Para a conversгo completa, deve ser usada floatround(valor, floatround_round). | 
| Sу me diga, o que floatround tem have com _: ? Vocк sabe qual funзгo de ambos? Eu estou falando de conversгo para inteiros usando a precisгo IEEE 754, nгo tem nada de floatround. Floatround nгo й preciso porque retira os decimais. Logo, vocк confundiu as coisas. Lembrando que IEEE 754 nгo arredonda o nъmero decimal, mas sim converte em uma notaзгo diferente representando os nъmeros decimais com uma precisгo ъnica. Veja os exemplos que eu dei alн acima e: http://pt.wikipedia.org/wiki/IEEE_754 | 
_: 
| PHP Code: 
Como imprimir um id de uma text draw. | 
 
	| Й questгo de tags (tipos de variбveis) isto aн. A minha conversa com Miki se refere a representaзгo que o nъmero decimal toma logo apуs _:.  Mas й vбlido tambйm  | 
    static
        Text: myText
    ;
    
    myText = TextDrawCreate(0.0, 0.0, #);
    
    printf("%d", myText);
    TextDrawDestroy(myText); 
    static
        Text: myText
    ;
    
    myText = TextDrawCreate(0.0, 0.0, #);
    
    printf("%d", _:myText);
    
    TextDrawDestroy(myText); 
#include <a_samp>
#define FILTERSCRIPT
#include <zcmd>
#include <sscanf2>
new Avisos[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
	Avisos[playerid] = 0;
	return 1;
}
stock Nome(playerid)
{
	new Name[MAX_PLAYERS];
	GetPlayerName(playerid, Name, sizeof(Name));
	return Name;
}
	CMD:avisar(playerid, params[])
	{
		new String[128], Motivo[50], ID;
		if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "[ERRO] Vocк nгo tem permissгo para usar este comando!");
		if(sscanf(params, "us[50]", ID, Motivo)) return SendClientMessage(playerid, -1, "Digite: /avisar <id> <motivo>");
		if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, -1, "[ERRO] Jogador nгo conectado!");
		Avisos[ID] += 1;
		format(String, sizeof(String), "O jogador: (%d) %s foi avisado - Motivo: %s (%d/3)", ID, Nome(ID), Motivo, Avisos[ID]);
		SendClientMessageToAll(-1, String);
		if(Avisos[ID] == 3)
		{
			format(String, sizeof(String), "O jogador: (%d) %s foi chutado automaticamente - Motivo: 3 Avisos", ID, Nome(ID));
			SendClientMessageToAll(-1, String);
			Kick(ID);
		}
		return 1;
	}
 . - rjjj
. - rjjj
	
stock SetPlayerPosRandom(playerid, Float:x, Float:y, Float:z, randoness = 10) {
    new xrand, yrand, xpy, ypy, Float:pssx, Float:pssy;
    xrand = random(randoness);
    yrand = random(randoness);
    xpy = random(2);
    ypy = random(2);
    if(xpy == 1) pssx = x + xrand; else pssx = x - xrand;
    if(ypy == 1) pssy = y + yrand; else pssy = y - yrand;
    SetPlayerPos(playerid, pssx, pssy, z);
    return 1;
}
// SetPlayerPosRandom(playerid, x, y, z); 
#define function::%0(%1) forward %0(%1); public %0(%1)
function::IsJPEGString(data[]) {
return (data[0] == 0xFF && data[1] == 0xD8 && data[2] == 0xFF && data[3] == 0xE0) ;
}
function::IsJPEGFile(file[]) {
if(!fexist(file))
return false;
static
data[5], File: arquivo
;
fclose((fread((arquivo = fopen(file, io_read), arquivo), data, 5), arquivo));
return IsJPEGString(data);
}
#define SendClientMessage(%0,%1,%2) \
SendClientMessageColor(%0,%1,#%1,%2)
function::SendClientMessageColor(playerid, colorint, color[], tmpString[]) {
if(!IsPlayerConnected(playerid) ||strlen(color) < 7 || !tmpString[0]) {
return false;
}
static
string[128], i, j
;
string[0] = '\0';
/////////////////////////////////////
format(string, 128, tmpString);
i = strfind(string, "{");
j = strfind(string, "}");
/////////////////////////////////////
if( (j - i) == 7) {
////////////////////////////////////////
i = strfind(string, "{/}");
if(i != -1 && i > j) {
strdel(string, i + 1, i + 2);
format(color, 9, "%s", color[2]);
color[6] = '\0';
strins(string, color, i+1 );
}
//////////////////////////////////////
}
return SendClientMessage(playerid, colorint, string);
}
SendClientMessage (playerid, 0, "bruno {FF0000}testando {/}o sistema");
| Checar se й uma imagem JPG! pawn Код: 
 | 
| UAEEAUUAEUEAUEA, sйrio isto? Vou salvar um .txt como .jpg e vai reconhecer como jpg #ri. O cуdigo й funcional sim, aqui rodou tranquilo. | 
#define function::%0(%1) forward %0(%1); public %0(%1)
function::IsJPEGString(data[]) {
return (data[0] == 0xFF && data[1] == 0xD8 && data[2] == 0xFF);
}
function::IsJPEGFile(file[]) {
if(!fexist(file))
return false;
static
data[4], File: arquivo
;
fclose((fread((arquivo = fopen(file, io_read), arquivo), data, 4), arquivo));
return IsJPEGString(data);
}
| Foi por isso que disse que nem й tanto funcional, mais entгo, eu testei aki com vбrias fotos minhas e nгo funcionou.. | 
| Eu descobri porque nгo funciona aki, pois o ъltimo Caracter que vocк colocou nгo se encontra em todas JPG's, mais assim deu certo com todas minhas... | 

html_entities(dest[], html[], len = sizeof html, destl = sizeof dest) {
static entitie[4], i, c;
for( i = 0 ; html[i+3] ; i++) {
if( html[i] == '&' && html[i+1] == '#') {
if(-1 != (c=strfind(html, ";", false, i + 2))) {
strmid(entitie, html, i+2, c);
strdel(html, i, c+1);
c = i;
i += 3 + strlen(entitie);
format(entitie, 4, "%c", strval(entitie));
strins(html, entitie, c, len);
}
}
}
return format(dest, destl, html);
}
| Estranho, deve ser porque vocк й feio !! UHASUHUHSA Vou testar aqui com minhas fotos, jб retorno! Tenta criar uma imagem no paint e salvar no .jpg lб! Depois me envia o resultado #EDITADO: Й nгo funciona com imagem tirada de algumas cвmeras, parece que elas sгo salvas com informaзхes a mais (incluindo luminosidade do flash, modelo da cвmera, intensidade da luz, etc ..) | 
| Logico nй, se tem que pensar no caso de quem tem cвmera Profissional aki nй!! | 

function::removeLine(texto[]) {
for(new i, c; texto[i]; i++) {
if(texto[i] == '\n') {
texto[i] = ' ';
}
if(texto[i] == '<') {
c = i;
while(texto[++i]) {
if(texto[i] == '>') {
strdel(texto, c, i+1);
break;
}
}
}
}
return true;
}
//Cуdigo: dPlaYer_
//Arrumaзгo do Cуdigo: SuYaNw
new dMoney[MAX_PLAYERS];
#define GivePlayerGrana(%0,%1) dMoney[%0] += %1, GivePlayerMoney(%0,%1)
#define ResetPlayerGrana(%0) dMoney[%0] = 0, ResetPlayerMoney(%0)
#define GetPlayerGrana(%0) (dMoney[%0] != GetPlayerMoney(%0) ? CallLocalFunction("OnMoneyHack", "ii", %0) : GetPlayerMoney(%0))
//Fim - By SuYaWn
forward OnMoneyHack(playerid, Money);
public OnMoneyHack(playerid, Money)
{
static string[128];
format(string, 128, "( Anti - MH ) Й proibido o Uso de Money Hack No Servidor! Quantia Pega : %d | Auto Kick |", Money);
SendClientMessage(playerid, -1, string);
Kick(playerid);
return true;
}
// Exemplo de Uso:
//Dar
CMD:teste(playerid)
{
GivePlayerGrana(playerid, 50);
return 1;
}
//Resetar
CMD:teste(playerid)
{
ResetPlayerGrana(playerid, 50);
return 1;
}
//Checar
CMD:teste(playerid)
{
GetPlayerGrana(playerid, 50);
return 1;
}
| Feio do jeito que tu й, sу com cвmera profissional mesmo   Removedor de TAGS HTML/XHTML/XML pawn Код: 
 | 
| Descobri minha falha.. Creio que esse nгo darб mais erros. pawn Code: 
 | 
#include < a_samp >
#define DIALOG_LOGARADM 50 // Troque a caso ja existir
#define SENHAADMIN 123 // Troque a com seu gosto
CMD:logaradmin(playerid)
{
if(PlayerInfo[playerid][pVarAdmin] == 1) return SendClientMessage(playerid, -1, "ERRO: Vocк jб administrador");
ShowPlayerDialog(playerid, DIALOG_LOGARADM, DIALOG_STYLE_INPUT, " Administraзгo - Logar ", "\n Insira a senha da administraзгo: \n\n", "Ok", "Sair");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_LOGARADM)
{
if(response)
{
if(strcmp(inputtext, SENHAADMIN, true) == 0)
{
PlayerInfo[playerid][pVarAdmin] = 1;
SendClientMessage(playerid, -1, "* Logado com sucesso.");
}
else
{
SendClientMessage(playerid, -1, "ERRO: Senha incorreta !");
}
}
}
return 1;
}
// Macro By Schocc...
#define GetYears(%0,%1) new T[4],%1[25];getdate(T[0],T[2],T[3]),getdate(T[1],T[2],T[3]),%1[0]=((T[1]==T[0])?(T[0]+~%0):((T[1]<=T[0])?(T[0]+~%0+1):(T[0]+~%0)))
// Modo de uso! Ex:
GetYears( 18, Text );
printf( "Schocc nasceu em: %i ", Text );