From af26dc83a50a494e5f37aa4186b1871db9b5762f Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Mon, 8 Mar 2004 17:34:37 +0000 Subject: [PATCH] changed to str_to_num/num_to_str --- plugins/adminhelp.sma | 2 +- plugins/adminvote.sma | 2 +- plugins/imessage.sma | 10 +++++----- plugins/nextmap.sma | 2 +- plugins/pausecfg.sma | 2 +- plugins/plmenu.sma | 2 +- plugins/restmenu.sma | 2 +- plugins/scrollmsg.sma | 2 +- plugins/statscfg.sma | 2 +- plugins/timeleft.sma | 6 +++--- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/plugins/adminhelp.sma b/plugins/adminhelp.sma index 95d84e20..a1a0b773 100755 --- a/plugins/adminhelp.sma +++ b/plugins/adminhelp.sma @@ -51,7 +51,7 @@ public client_putinserver(id) public cmdHelp(id,level,cid){ new arg1[8],flags = get_user_flags(id) - new start = read_argv(1,arg1,7) ? str_to_int(arg1) : 1 + new start = read_argv(1,arg1,7) ? str_to_num(arg1) : 1 if (--start < 0) start = 0 new clcmdsnum = get_concmdsnum(flags,id) if (start >= clcmdsnum) start = clcmdsnum - 1 diff --git a/plugins/adminvote.sma b/plugins/adminvote.sma index 4ef329a3..18a13b02 100755 --- a/plugins/adminvote.sma +++ b/plugins/adminvote.sma @@ -333,7 +333,7 @@ public cmdVoteKickBan(id,level,cid) { if (voteban) get_user_authid(player,g_optionName[0],31) else - int_to_str(get_user_userid(player),g_optionName[0],31) + num_to_str(get_user_userid(player),g_optionName[0],31) new authid[32],name[32] get_user_authid(id,authid,31) get_user_name(id,name,31) diff --git a/plugins/imessage.sma b/plugins/imessage.sma index eed73665..5899c440 100755 --- a/plugins/imessage.sma +++ b/plugins/imessage.sma @@ -51,7 +51,7 @@ public plugin_init(){ register_cvar("amx_freq_imessage","10") new lastinfo[8] get_localinfo("lastinfomsg",lastinfo,7) - g_Current = str_to_int(lastinfo) + g_Current = str_to_num(lastinfo) set_localinfo("lastinfomsg","") } @@ -82,11 +82,11 @@ public setMessage(id,level,cid) { while(replace(g_Messages[g_MessagesNum],380,"\n","^n")){} new mycol[12] read_argv(2,mycol,11) // RRRGGGBBB - g_Values[g_MessagesNum][2] = str_to_int(mycol[6]) + g_Values[g_MessagesNum][2] = str_to_num(mycol[6]) mycol[6] = 0 - g_Values[g_MessagesNum][1] = str_to_int(mycol[3]) + g_Values[g_MessagesNum][1] = str_to_num(mycol[3]) mycol[3] = 0 - g_Values[g_MessagesNum][0] = str_to_int(mycol[0]) + g_Values[g_MessagesNum][0] = str_to_num(mycol[0]) g_MessagesNum++ new Float:freq_im = get_cvar_float("amx_freq_imessage") if ( freq_im > 0.0 ) set_task( freq_im ,"infoMessage",12345) @@ -95,6 +95,6 @@ public setMessage(id,level,cid) { public plugin_end(){ new lastinfo[8] - int_to_str(g_Current,lastinfo,7) + num_to_str(g_Current,lastinfo,7) set_localinfo("lastinfomsg",lastinfo) } \ No newline at end of file diff --git a/plugins/nextmap.sma b/plugins/nextmap.sma index 0210b624..04dc0d65 100755 --- a/plugins/nextmap.sma +++ b/plugins/nextmap.sma @@ -53,7 +53,7 @@ public plugin_init() new szString[32], szString2[32], szString3[8] get_localinfo( "lastmapcycle", szString , 31 ) parse( szString, szString2, 31, szString3 , 7 ) - g_pos = str_to_int( szString3 ) + g_pos = str_to_num( szString3 ) get_cvar_string( "mapcyclefile" , g_mapCycle , 31 ) if ( !equal( g_mapCycle , szString2 ) ) diff --git a/plugins/pausecfg.sma b/plugins/pausecfg.sma index 9b81b9b3..095bd5e5 100755 --- a/plugins/pausecfg.sma +++ b/plugins/pausecfg.sma @@ -318,7 +318,7 @@ public cmdPlugin(id,level,cid){ } else if ( equal(cmds, "list" ) ) { new arg1[8], running = 0 - new start = read_argv(2,arg1,7) ? str_to_int(arg1) : 1 + new start = read_argv(2,arg1,7) ? str_to_num(arg1) : 1 if (--start < 0) start = 0 new plgnum = get_pluginsnum() if (start >= plgnum) start = plgnum - 1 diff --git a/plugins/plmenu.sma b/plugins/plmenu.sma index 73bfc983..6988fc53 100755 --- a/plugins/plmenu.sma +++ b/plugins/plmenu.sma @@ -575,7 +575,7 @@ public actionClcmdMenu(id,key) copy(command,63,g_clcmdCmd[g_menuSelect[id][g_menuOption[id]]]) get_user_authid(player,authid,31) get_user_name(player,name,31) - int_to_str(get_user_userid(player),userid,31) + num_to_str(get_user_userid(player),userid,31) replace(command,63,"%userid%",userid) replace(command,63,"%authid%",authid) replace(command,63,"%name%",name) diff --git a/plugins/restmenu.sma b/plugins/restmenu.sma index 5b4cb415..1b4970ac 100755 --- a/plugins/restmenu.sma +++ b/plugins/restmenu.sma @@ -466,7 +466,7 @@ public cmdRest(id,level,cid){ switchCommand( id, 0 ) else if ( equali( "list" , cmd ) ) { new arg1[8] - new start = read_argv(2,arg1,7) ? str_to_int(arg1) : 1 + new start = read_argv(2,arg1,7) ? str_to_num(arg1) : 1 if (--start < 0) start = 0 if (start >= MAXMENUPOS) start = MAXMENUPOS - 1 new end = start + 10 diff --git a/plugins/scrollmsg.sma b/plugins/scrollmsg.sma index da72ed2b..89be5507 100755 --- a/plugins/scrollmsg.sma +++ b/plugins/scrollmsg.sma @@ -92,7 +92,7 @@ public setMessage(id,level,cid) { g_Length = strlen(g_scrollMsg) new mytime[32] read_argv(2,mytime,31) - g_Frequency = str_to_int(mytime) + g_Frequency = str_to_num(mytime) if (g_Frequency > 0) { new minimal = floatround((g_Length + 48) * (SPEED + 0.1)) if (g_Frequency < minimal) { diff --git a/plugins/statscfg.sma b/plugins/statscfg.sma index 04961f83..c4bfee62 100755 --- a/plugins/statscfg.sma +++ b/plugins/statscfg.sma @@ -105,7 +105,7 @@ public cmdCfg( id,level,cid ){ } else if ( equali(cmds, "list" ) ) { new arg1[8] - new start = read_argv(2,arg1,7) ? str_to_int(arg1) : 1 + new start = read_argv(2,arg1,7) ? str_to_num(arg1) : 1 if (--start < 0) start = 0 if (start >= g_menuDataNum) start = g_menuDataNum - 1 new end = start + 10 diff --git a/plugins/timeleft.sma b/plugins/timeleft.sma index 5872550d..f395d381 100755 --- a/plugins/timeleft.sma +++ b/plugins/timeleft.sma @@ -54,8 +54,8 @@ public sayTheTime(id){ new mhours[6], mmins[6], whours[32], wmins[32], wpm[6] get_time("%H",mhours,5) get_time("%M",mmins,5) - new mins = str_to_int(mmins) - new hrs = str_to_int(mhours) + new mins = str_to_num(mmins) + new hrs = str_to_num(mhours) if (mins) num_to_word(mins,wmins,31) else @@ -154,7 +154,7 @@ public setDisplaying(){ while (i < argc && i < 32){ read_argv(i+1,arg,31) parse(arg,flags,31,num,31) - g_TimeSet[i][0] = str_to_int(num) + g_TimeSet[i][0] = str_to_num(num) g_TimeSet[i][1] = read_flags(flags) i++ }