Raised This Month: $ Target: $400
 0% 

someone can help me??i'am noob..(about native)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
etet
Junior Member
Join Date: Aug 2008
Old 08-28-2008 , 13:55   someone can help me??i'am noob..(about native)
Reply With Quote #1

i wanna to know how can i add native work on this mod and can finish compile.

i don't know this 2 line code~
where i should put in??

Code:
native ryu_get_money(id)
native ryu_set_money(id, iMoney, iFlash)
this is a native~

that all,sorry for my poor english thx very mush: )


Code:
/**
 * teambets.sma
 * Adds team betting. After dying, a player can bet on which team will win.
 * Ported from SM to AMXX by Teyut.
 */
#include <amxmodx>
#include <cstrike>
#pragma semicolon 1
#define PLUGIN_NAME    "Team Bets"
#define PLUGIN_VERSION "1.4"
#define PLUGIN_AUTHOR  "ferret"
#define BET_AMOUNT 0
#define BET_WIN 1
#define BET_TEAM 2
/* TODO: stop using hard-coded max players count and use dynamic array instead. */
#define MAXPLAYERS 32
new g_bEnabled = false;
new g_iPlayerBetData[MAXPLAYERS + 1][3];
new bool:g_bPlayerBet[MAXPLAYERS + 1] = {false, ...};
new bool:g_bOneVsMany = false;
new g_iOneVsManyPot;
new g_iOneVsManyTeam;
new g_hAmxBet;
new g_hAmxBetDeadOnly;
new g_hAmxBetOneVsMany;
new g_hAmxBetAnnounce;
public plugin_init()
{
  register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
 
  register_dictionary("teambets.txt");
  register_cvar("amx_teambets_version", PLUGIN_VERSION, FCVAR_SERVER|FCVAR_SPONLY); /*TeamBets Version*/
  register_clcmd("say", "Command_Say");
  register_clcmd("say_team", "Command_Say");
  g_hAmxBet = register_cvar("amx_bet", "1"); /*Enable team betting? (0 off, 1 on, def. 1)*/
  g_hAmxBetDeadOnly = register_cvar("amx_bet_deadonly", "1"); /*Only dead players can bet. (0 off, 1 on, def. 1)*/
  g_hAmxBetOneVsMany = register_cvar("amx_bet_onevsmany", "0");  /*The winner of a 1 vs X fight gets the losing pot (def. 0)*/
  g_hAmxBetAnnounce = register_cvar("amx_bet_announce", "0");  /*Announce 1 vs 1 situations (0 off, 1 on, def. 0)*/
  register_event("SendAudio", "Event_RoundEnd", "a", "2=%!MRAD_terwin", "2=%!MRAD_ctwin", "2=%!MRAD_rounddraw");
  register_event("DeathMsg", "Event_PlayerDeath", "a");
  set_task(1.0, "CheckConVar_AmxBet", _, _, _, "b");
  g_bEnabled = true;
  server_print("[itbet] - Loaded");
}
public CheckConVar_AmxBet()
{
  g_bEnabled = (get_pcvar_num(g_hAmxBet) == 1);
}
public Command_Say(client)
{
  if (!g_bEnabled)
    return PLUGIN_CONTINUE;
  new szText[192], iTextLen;
  read_args(szText, sizeof(szText) - 1);
  szText[sizeof(szText) - 1] = 0;
  iTextLen = strlen(szText);
  if(iTextLen < 2)
    return PLUGIN_CONTINUE;
  /* Strips trailling quote */
  szText[iTextLen - 1] = 0;
  new szVerb[16], szTeam[16], szAmount[16];
  parse(szText[1], szVerb, sizeof(szVerb) - 1, szTeam, sizeof(szTeam) - 1, szAmount, sizeof(szAmount) - 1);
  szVerb[sizeof(szVerb) - 1] = 0;
  szTeam[sizeof(szTeam) - 1] = 0;
  szAmount[sizeof(szAmount) - 1] = 0;
  if (strcmp(szVerb, "bet", 1) != 0)
    return PLUGIN_CONTINUE;
  if (g_bPlayerBet[client])
etet is offline
 



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

Forum Jump


All times are GMT -4. The time now is 20:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode