Raised This Month: $ Target: $400
 0% 

teleport a player to a random place


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
hzqst
Senior Member
Join Date: Jul 2008
Old 07-26-2008 , 04:50   teleport a player to a random place
Reply With Quote #1

i use resethud to detect the player spawn
and use
get_user_origin(id,gspawn[id])
to store where he spawned
Quote:
public zmtele(id){
if(get_user_team(id) == 3 || get_user_team(id) == 0 || !is_user_alive(id))
return PLUGIN_HANDLED;
if(gteletimes[id] <= 0){
client_print(id, print_chat, "%L", id, "ZM_TELE_USEUP")
return PLUGIN_HANDLED;
}
if(gspawn[id][0] == 0 && gspawn[id][1] == 0){
client_print(id, print_chat, "%L", id, "ZM_TELE_ERROR")
return PLUGIN_HANDLED;
}
new x
while(get_user_team(x) != 0 && get_user_team(x) != 3 && is_user_connected(x)){
x = random_num(1,get_maxplayers())
if (get_user_team(x) != 0 && get_user_team(x) != 3 && is_user_connected(x))
set_user_origin(id,gspawn[x])
}
gteletimes[id] --
client_print(id, print_chat, "%L", id, "ZM_TELE",gteletimes[id])
return PLUGIN_HANDLED;
}
but nothing happened

Last edited by hzqst; 07-26-2008 at 05:02.
hzqst 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 05:32.


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