changed to str_to_num/num_to_str

This commit is contained in:
Felix Geyer 2004-03-08 17:34:37 +00:00
parent 87378017fd
commit af26dc83a5
10 changed files with 16 additions and 16 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)
}

View File

@ -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 ) )

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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) {

View File

@ -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

View File

@ -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++
}