|
看过slots_reservation.sma,里面有一段:
new who = 0, time, shortest = 0x7fffffff
new maxplayers = get_maxplayers()
for(new i = 1; i <= maxplayers; i++){
if ( !is_user_connected(i) && !is_user_connecting(i) )
continue // 跳过没有分配给玩家的空id
if (get_user_flags(i)&ADMIN_RESERVATION)
continue // 跳过有通道使用权的玩家
time = get_user_time(i,1) // get user playing time,the connection time is minused.
if ( shortest > time ) {
shortest = time
--->shortest = 0x7fffffff 这个的单位是秒吗? 定义成0xffffffffffffff等等足够大就行吧?
还有个小问题:
new userip[17]
get_user_ip(id,userip,16,1)
不知道
new userip[16]和get_user_ip(id,userip,15,1)行不行?
自己理解get_user_ip在 [ without_port=1 ]时应该类似"192.168.0.1\0"这样的自串 |
|