02.06.2012, 15:16
(
Last edited by Don_Speed; 02/06/2012 at 04:40 PM.
)
@corrigido Vlw a Todos
new ID;
if(sscanf(params, "rd", ID, moneys))
CMD:pagar(playerid,params[])
{
new ID, string[100], moneys;
if(sscanf(params, "ud", ID, moneys))
return SendClientMessage(playerid,-1,"Use:/pagar [ID] [QUANTIA]");//AVISO
if (!IsPlayerConnected(ID))
return SendClientMessage(playerid,-1,"PlayerInativo");//AVISO
if (moneys > 1000 && PlayerInfo[playerid][pNivel] < 3)
return SendClientMessage(playerid, COLOR_GRAD1, "Vocк precisa de nivel 3 para pagar mais de $1000");
if (moneys < 1 || moneys > 99999)
return SendClientMessage(playerid, COLOR_GRAD1, "Pagamento Minimo 1 Maximo 99999 de cada vez.");
if (PlayerInfo[playerid][pLocal] == 106)
return SendClientMessage(playerid, COLOR_GRAD1, "Comando nгo permitido nesse local");
if (modoadmin[ID] >= 1 || modohelper[ID] >= 1)
return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode pagar para um Admin ou Helper em modo de trabalho!");//AVISO
if (ProxDetectorS(5.0, playerid, ID))//AVISO
{
new sendername[MAX_PLAYER_NAME], givename[MAX_PLAYER_NAME], pmoney;
GetPlayerName(ID, givename, sizeof(givename));
GetPlayerName(playerid, sendername, sizeof(sendername));
pmoney = GetPlayerMoney(playerid);
if (pmoney <= moneys)
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo possui essa grana.");
ConsumingMoney[ID] = 1;//AVISO
GivePlayerMoney(playerid, -moneys));
GivePlayerMoney(ID, moneys);//AVISO
format(string, sizeof(string), " Vocк pagou $%d para %s.", moneys, givename);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " Vocк recebeu $%d de %s(ID: %d).", moneys, sendername, playerid);
SendClientMessage(ID, COLOR_GRAD1, string);//AVISO
format(string, sizeof(string), "%s Pagou $%d para %s", sendername, moneys, givename);
PayLog(string);
if(moneys >= 1000000)
{
ABroadCast(COLOR_YELLOW,string,1);
}
PlayerPlaySound(ID, 1052, 0.0, 0.0, 0.0);//AVISO
format(string, sizeof(string), "* %s Pagou para %s.", sendername, givename);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else SendClientMessage(playerid, COLOR_GRAD1, "Jogador Muito Longe");
return 1;
}
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46923) : warning 219: local variable "ID" shadows a variable at a preceding level
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46924) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46925) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46929) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46929) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46930) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46936) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46938) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46943) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46950) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46923) : warning 203: symbol is never used: "ID"
CMD:pagar(playerid,params[])
{
new string[100], moneys, ID;
if(sscanf(params, "rd", ID, moneys))return SendClientMessage(playerid,-1,"Use:/pagar [ID] [QUANTIA]");//AVISO
if (!IsPlayerConnected(ID))return SendClientMessage(playerid,-1,"PlayerInativo");//AVISO
if (moneys > 1000 && PlayerInfo[playerid][pNivel] < 3)return SendClientMessage(playerid, COLOR_GRAD1, "Vocк precisa de nivel 3 para pagar mais de $1000");
if (moneys < 1 || moneys > 99999)return SendClientMessage(playerid, COLOR_GRAD1, "Pagamento Minimo 1 Maximo 99999 de cada vez.");
if (PlayerInfo[playerid][pLocal] == 106)return SendClientMessage(playerid, COLOR_GRAD1, "Comando nгo permitido nesse local");
if (modoadmin[ID] >= 1 || modohelper[ID] >= 1)return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode pagar para um Admin ou Helper em modo de trabalho!");//AVISO
if (ProxDetectorS(5.0, playerid, ID))//AVISO
{
new Name[MAX_PLAYER_NAME];
//GetPlayerName(ID, Name, sizeof(Name));
GetPlayerName(playerid, sendername, sizeof(sendername));
if (moneys > 0 && moneys >= moneys)return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo possui essa grana.");
ConsumingMoney[ID] = 1;//AVISO
GivePlayerMoneyEx(playerid, (0 - moneys));
GivePlayerMoneyEx(ID, moneys);//AVISO
format(string, sizeof(string), " Vocк pagou $%d para %s.", moneys, Name);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " Vocк recebeu $%d de %s(ID: %d).", moneys, sendername, playerid);
SendClientMessage(ID, COLOR_GRAD1, string);//AVISO
format(string, sizeof(string), "%s Pagou $%d para %s", sendername, moneys, Name);
PayLog(string);
if(moneys >= 1000000)
{
ABroadCast(COLOR_YELLOW,string,1);
}
PlayerPlaySound(ID, 1052, 0.0, 0.0, 0.0);//AVISO
format(string, sizeof(string), "* %s Pagou para %s.", sendername ,Name);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}else{ SendClientMessage(playerid, COLOR_GRAD1, "Jogador Muito Longe"); }
return 1;
}
CMD:pagar(playerid,params[])
{
new ID, string[100], moneys;
if(sscanf(params, "ud", ID, moneys))
return SendClientMessage(playerid,-1,"Use:/pagar [ID] [QUANTIA]");//AVISO
if (!IsPlayerConnected(ID))
return SendClientMessage(playerid,-1,"PlayerInativo");//AVISO
if (moneys > 1000 && PlayerInfo[playerid][pNivel] < 3)
return SendClientMessage(playerid, COLOR_GRAD1, "Vocк precisa de nivel 3 para pagar mais de $1000");
if (moneys < 1 || moneys > 99999)
return SendClientMessage(playerid, COLOR_GRAD1, "Pagamento Minimo 1 Maximo 99999 de cada vez.");
if (PlayerInfo[playerid][pLocal] == 106)
return SendClientMessage(playerid, COLOR_GRAD1, "Comando nгo permitido nesse local");
if (modoadmin[ID] >= 1 || modohelper[ID] >= 1)
return SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo pode pagar para um Admin ou Helper em modo de trabalho!");//AVISO
if (ProxDetectorS(5.0, playerid, ID))//AVISO
{
new sendername[MAX_PLAYER_NAME], givename[MAX_PLAYER_NAME], pmoney;
GetPlayerName(ID, givename, sizeof(givename));
GetPlayerName(playerid, sendername, sizeof(sendername));
pmoney = GetPlayerMoney(playerid);
if (pmoney < moneys)
return SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo possui essa grana.");
ConsumingMoney[ID] = 1;//AVISO
GivePlayerMoney(playerid, -moneys);
GivePlayerMoney(ID, moneys);//AVISO
format(string, sizeof(string), " Vocк pagou $%d para %s.", moneys, givename);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " Vocк recebeu $%d de %s(ID: %d).", moneys, sendername, playerid);
SendClientMessage(ID, COLOR_GRAD1, string);//AVISO
format(string, sizeof(string), "%s Pagou $%d para %s", sendername, moneys, givename);
PayLog(string);
if(moneys >= 1000000)
{
ABroadCast(COLOR_YELLOW,string,1);
}
PlayerPlaySound(ID, 1052, 0.0, 0.0, 0.0);//AVISO
format(string, sizeof(string), "* %s Pagou para %s.", sendername, givename);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else SendClientMessage(playerid, COLOR_GRAD1, "Jogador Muito Longe");
return 1;
}
eu testei aki funcionou perfeitamente, se der erro, й as linhas acima desse comando ou falta alguma var, etc....
pawn Code:
|
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46978) : warning 219: local variable "ID" shadows a variable at a preceding level
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46979) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46982) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46994) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46994) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46997) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46999) : warning 219: local variable "sendername" shadows a variable at a preceding level
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47000) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47006) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47008) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47013) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(47020) : warning 213: tag mismatch
C:\Documents and Settings\mau\Desktop\Arquivos\PerfectLife\gamemodes\BPL.pwn(46978) : warning 203: symbol is never used: "ID"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 11620 bytes
Code size: 2022232 bytes
Data size: 7998028 bytes
Stack/heap size: 16384 bytes; estimated max. usage=7447 cells (29788 bytes)
Total requirements:10048264 bytes
13 Warnings.
Compilou Assim:
pawn Code:
|