SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Português/Portuguese

Reply
 
Thread Tools Display Modes
Old 16/10/2011, 03:16 AM   #1
geovanni_
Little Clucker
 
Join Date: Oct 2011
Posts: 28
Reputation: 0
Cool [codigo][cmd]/info em dialog

no inicio do seu gm
Quote:
pawn Code:
#define info 123

new Kills[MAX_PLAYERS];
new Deaths[MAX_PLAYERS];
no OnPlayerCommandText
Quote:
pawn Code:
if(strcmp(cmdtext, "/info", true) == 0)
{
    new string[256];
    new grana = GetPlayerMoney(playerid);

    format(string,sizeof(string),"Assassinatos (%d) - Mortes (%d) - Ratio (%00.1f) - Dinheiro (%d)",
    Kills[playerid],Deaths[playerid],Float:Kills[playerid]/Float:Deaths[playerid],grana);
    ShowPlayerDialog(playerid,info,DIALOG_STYLE_MSGBOX,"meu-info 1/2",string,"Proximo","sair");

    return 1;
}
em OnDialogResponse
Quote:
pawn Code:
if(dialogid == info)
    {
    if(response == 0)
    {
    SendClientMessage(playerid, 0xF68E00F6, " Você Saiu :C");
    }
    if(response == 1)
    {

    new string1[256];
    new ping = GetPlayerPing(playerid);

    new Float:vida;
    GetPlayerHealth(playerid,vida);

    new Float:colete;
    GetPlayerArmour(playerid,colete);

    new Float:vidav;
    GetVehicleHealth(GetPlayerVehicleID(playerid),vidav);

    format(string1,sizeof(string1),"\nVida (%0.1f) - Colete (%0.1f) - Vida Veículo (%0.1f) - Ping (%d)",
    vida,colete,vidav,ping);
    ShowPlayerDialog(playerid,info+1,DIALOG_STYLE_MSGBOX,"meu-info 2/2",string1,"sair","");
    }
    }
geovanni_ is offline   Reply With Quote
Old 16/10/2011, 03:21 AM   #2
geovanni_
Little Clucker
 
Join Date: Oct 2011
Posts: 28
Reputation: 0
Default Re: [codigo][cmd]/info em dialog

Assassinatos Mortes Ratio Dinheiro
Vida Colete Vida Veículo Ping

[ratio]tipo asim se vc morrer 50x e matar 50x vc vai ta com ration 50.0%
se vc morrer 50 e matar 0 vc vai tar com ratio 0.0%
se vc matar 100 ou 50 sei la e morrer 0 vai ficar ration 100.0%
geovanni_ is offline   Reply With Quote
Old 16/10/2011, 04:33 PM   #3
ViniBorn
Godfather
 
ViniBorn's Avatar
 
Join Date: Aug 2010
Location: Brasília
Posts: 5,028
Reputation: 648
Default Re: [codigo][cmd]/info em dialog

Que isso?
__________________
ViniBorn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[AJUDA] Codigo Lipe_Stronda Português/Portuguese 7 04/08/2011 09:51 PM
[Codigo]Sistema de anuncio em Dialog (/an ou /anuncio) patricknches Português/Portuguese 1 08/04/2011 04:14 PM
[Ajuda] Oque Tem de errado neste codigo Codigo Twisted_. Português/Portuguese 6 24/03/2011 12:39 AM
Depurador Código SuperMarioRol Español/Spanish 8 11/02/2011 11:57 AM


All times are GMT. The time now is 02:08 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.