[Ajuda] Como fazer
#1

Queria saber como fazer,
Exemplo:
O Player FULANO matou FULANINHO e ganhou 1000
Mais tipo
quero fazer Para quem matar os procurados do meu server
Aki ta o codigo dos procurados que voceis precisa:

pawn Код:
if(Procurados[plid] == 1){
GivePlayerGrana(playerid,20000);
Procurados[plid] = 0;
SendClientMessage(playerid, Verde, "(INFO) Vocк Matou um Procurado e ganhou R$: 20000.");
dini_IntSet(file2, "Procurado", 0);
}
Ai quando o cara mata ele ganhar esse dinheiro Tem como me ajudarem?

PS: Tem que ganhar dinheiro so quando matar PROCURADO.
Reply
#2

pawn Код:
// public OnPlayerDeath(playerid, killerid, reason)

    if(Procurados[playerid] >= 1)
    {
        new strdt[100], quantia = 20000;       
       
        format(strdt, 100, "%s matou %s e ganhou %d.", GetPlayerNameEx(killerid), GetPlayerNameEx(playerid), quantia);
       
        Procurados[playerid] = 0;
        dini_IntSet(file2, "Procurado", 0);
       
        GivePlayerGrana(killerid, quantia);    
        SendClientMessageToAll(Verde, strdt);
    }
   
// Fim do GM/FS
static stock GetPlayerNameEx(i)
{
    static n[24];
    GetPlayerName(i,n,24);
    return n;
}
Reply
#3

pawn Код:
C:\Samp Server\gamemodes\MUCA.pwn(9645) : warning 219: local variable "quantia" shadows a variable at a preceding level
C:\Samp Server\gamemodes\MUCA.pwn(11568) : warning 219: local variable "quantia" shadows a variable at a preceding level
C:\Samp Server\gamemodes\MUCA.pwn(11621) : warning 219: local variable "quantia" shadows a variable at a preceding level
C:\Samp Server\gamemodes\MUCA.pwn(16435) : error 010: invalid function or declaration
C:\Samp Server\gamemodes\MUCA.pwn(16439) : error 021: symbol already defined: "format"
C:\Samp Server\gamemodes\MUCA.pwn(16441) : error 010: invalid function or declaration
C:\Samp Server\gamemodes\MUCA.pwn(16442) : error 021: symbol already defined: "dini_IntSet"
C:\Samp Server\gamemodes\MUCA.pwn(16444) : warning 219: local variable "quantia" shadows a variable at a preceding level
C:\Samp Server\gamemodes\MUCA.pwn(16445) : error 021: symbol already defined: "SendClientMessageToAll"
C:\Samp Server\gamemodes\MUCA.pwn(18176) : error 025: function heading differs from prototype
C:\Samp Server\gamemodes\MUCA.pwn(18536) : warning 203: symbol is never used: "DivulguersOtarios"
C:\Samp Server\gamemodes\MUCA.pwn(1988) : warning 204: symbol is assigned a value that is never used: "entrarpref"
C:\Samp Server\gamemodes\MUCA.pwn(1988 -- 18536) : warning 203: symbol is never used: "quantia"
C:\Samp Server\gamemodes\MUCA.pwn(1988 -- 18536) : warning 203: symbol is never used: "strdt"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
Reply
#4

pawn Код:
// Dentro da public OnPlayerDeath

    if(Procurados[playerid] >= 1)
    {
        new strdt[100], quantiaparadar = 20000;      
       
        format(strdt, 100, "%s matou %s e ganhou %d.", GetPlayerNameEx(killerid), GetPlayerNameEx(playerid), quantiaparadar);
       
        Procurados[playerid] = 0;
       
        GivePlayerGrana(killerid, quantiaparadar);    
        SendClientMessageToAll(Verde, strdt);
    }
   
// Fim do GM/FS
static stock GetPlayerNameEx(i)
{
    static n[24];
    GetPlayerName(i,n,24);
    return n;
}
Reply
#5

pawn Код:
C:\Samp Server\gamemodes\MUCA.pwn(16436) : error 010: invalid function or declaration
C:\Samp Server\gamemodes\MUCA.pwn(16440) : error 021: symbol already defined: "format"
C:\Samp Server\gamemodes\MUCA.pwn(16442) : error 010: invalid function or declaration
C:\Samp Server\gamemodes\MUCA.pwn(16444) : warning 219: local variable "quantiaparadar" shadows a variable at a preceding level
C:\Samp Server\gamemodes\MUCA.pwn(16445) : error 021: symbol already defined: "SendClientMessageToAll"
C:\Samp Server\gamemodes\MUCA.pwn(18176) : error 025: function heading differs from prototype
C:\Samp Server\gamemodes\MUCA.pwn(18536) : warning 203: symbol is never used: "DivulguersOtarios"
C:\Samp Server\gamemodes\MUCA.pwn(1988) : warning 204: symbol is assigned a value that is never used: "entrarpref"
C:\Samp Server\gamemodes\MUCA.pwn(1988 -- 18536) : warning 203: symbol is never used: "quantiaparadar"
C:\Samp Server\gamemodes\MUCA.pwn(1988 -- 18536) : warning 203: symbol is never used: "strdt"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)