GivePlayerMoney(playerid, -200);
public OnPlayerCommandText(playerid, cmdtext[]){
static str_msg[128];
if(!strcmp(cmdtext, "/cvida", true)){
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? n?o tem dinheiro suficiente!");
if(Block_Vida[playerid] == 1) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? j? pegou vida, aguarde voc? morrer para poder pegar novamente!");
format(str_msg, sizeof(str_msg), "{FF0000}[INFO]{FFFFFF} %s comprou vida e gastou R$100. ( /vida )", Nome(playerid));
SendClientMessageToAll(0xFFFFFF, str_msg);
RewardPlayer(playerid, -200, 0);
SetPlayerHealth(playerid, 100);
Block_Vida[playerid] = 1;
return true;
}
if(!strcmp(cmdtext, "/ccolete", true)){
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? n?o tem dinheiro suficiente!");
if(Block_Colete[playerid] == 1) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? j? pegou colete, aguarde voc? morrer para poder pegar novamente!");
format(str_msg, sizeof(str_msg), "{FF0000}[INFO]{FFFFFF} %s comprou colete e gastou R$100. ( /colete )", Nome(playerid));
SendClientMessageToAll(0xFFFFFF, str_msg);
RewardPlayer(playerid, -200, 0);
SetPlayerArmour(playerid, 100);
Block_Colete[playerid] = 1;
return true;
}
return false;
}
Tente assim...
PHP код:
|
C:\Users\Max\Desktop\a.pwn(1 : error 017: undefined symbol "RewardPlayer" C:\Users\Max\Desktop\a.pwn(2 : error 017: undefined symbol "RewardPlayer" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors. |
public OnPlayerCommandText(playerid, cmdtext[]){
static str_msg[128];
if(!strcmp(cmdtext, "/cvida", true)){
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? n?o tem dinheiro suficiente!");
if(Block_Vida[playerid] == 1) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? j? pegou vida, aguarde voc? morrer para poder pegar novamente!");
format(str_msg, sizeof(str_msg), "{FF0000}[INFO]{FFFFFF} %s comprou vida e gastou R$100. ( /vida )", Nome(playerid));
SendClientMessageToAll(0xFFFFFF, str_msg);
GivePlayerMoney(playerid, -200);
SetPlayerHealth(playerid, 100);
Block_Vida[playerid] = 1;
return true;
}
if(!strcmp(cmdtext, "/ccolete", true)){
if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? n?o tem dinheiro suficiente!");
if(Block_Colete[playerid] == 1) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? j? pegou colete, aguarde voc? morrer para poder pegar novamente!");
format(str_msg, sizeof(str_msg), "{FF0000}[INFO]{FFFFFF} %s comprou colete e gastou R$100. ( /colete )", Nome(playerid));
SendClientMessageToAll(0xFFFFFF, str_msg);
GivePlayerMoney(playerid, -200);
SetPlayerArmour(playerid, 100);
Block_Colete[playerid] = 1;
return true;
}
return false;
}
PHP код:
|
public OnPlayerCommandText(playerid, cmdtext[]) { static str_msg[128]; if(!strcmp(cmdtext, "/cvida", true)){ if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? n?o tem dinheiro suficiente!"); if(Block_Vida[playerid] == 1) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? j? pegou vida, aguarde voc? morrer para poder pegar novamente!"); format(str_msg, sizeof(str_msg), "{FF0000}[INFO]{FFFFFF} %s comprou vida e gastou R$100. ( /vida )", Nome(playerid)); SendClientMessageToAll(0xFFFFFF, str_msg); GivePlayerMoney(playerid, -200); SetPlayerHealth(playerid, 100); Block_Vida[playerid] = 1; return true; } if(!strcmp(cmdtext, "/ccolete", true)) { if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? n?o tem dinheiro suficiente!"); if(Block_Colete[playerid] == 1) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? j? pegou colete, aguarde voc? morrer para poder pegar novamente!"); format(str_msg, sizeof(str_msg), "{FF0000}[INFO]{FFFFFF} %s comprou colete e gastou R$100. ( /colete )", Nome(playerid)); SendClientMessageToAll(0xFFFFFF, str_msg); GivePlayerMoney(playerid, -200); SetPlayerArmour(playerid, 100); Block_Colete[playerid] = 1; return true; } return false; }
#define GivePlayerGrana GivePlayerMoney
#define FILTERSCRIPT #include <a_samp> #if defined FILTERSCRIPT #define GivePlayerGrana GivePlayerMoney new Block_Vida[MAX_PLAYERS], Block_Colete[MAX_PLAYERS]; public OnFilterScriptInit() return print("\n- FilterScript de vida e colete carregado.\n"); public OnPlayerDeath(playerid, killerid, reason) return Block_Vida[playerid] = 0, Block_Colete[playerid] = 0; public OnPlayerCommandText(playerid, cmdtext[]) { static str_msg[128]; if(!strcmp(cmdtext, "/cvida", true)){ if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? n?o tem dinheiro suficiente!"); if(Block_Vida[playerid] == 1) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? j? pegou vida, aguarde voc? morrer para poder pegar novamente!"); format(str_msg, sizeof(str_msg), "{FF0000}[INFO]{FFFFFF} %s comprou vida e gastou R$100. ( /vida )", Nome(playerid)); SendClientMessageToAll(0xFFFFFF, str_msg); GivePlayerMoney(playerid, -200); SetPlayerHealth(playerid, 100); Block_Vida[playerid] = 1; return true; } if(!strcmp(cmdtext, "/ccolete", true)) { if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? n?o tem dinheiro suficiente!"); if(Block_Colete[playerid] == 1) return SendClientMessage(playerid, 0xFFF000AA, "[ERRO]: Voc? j? pegou colete, aguarde voc? morrer para poder pegar novamente!"); format(str_msg, sizeof(str_msg), "{FF0000}[INFO]{FFFFFF} %s comprou colete e gastou R$100. ( /colete )", Nome(playerid)); SendClientMessageToAll(0xFFFFFF, str_msg); GivePlayerMoney(playerid, -200); SetPlayerArmour(playerid, 100); Block_Colete[playerid] = 1; return true; } return false; } Nome(playerid){ new NomeFDP[MAX_PLAYER_NAME]; GetPlayerName(playerid, NomeFDP, 24); return NomeFDP; } #endif |