Raised This Month: $ Target: $400
 0% 

[kick players] little question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
blaah
Member
Join Date: Jun 2004
Location: germany
Old 07-14-2004 , 18:26   [kick players] little question
Reply With Quote #1

hi,
i want to kick a player and write a reason in the console.
but there stands just the first word.. how can i add " in the commandline, so that the reason stands in " "? if i try to comment out with \" nothing happens

Code:
if(count[id] >= 4){
	console_cmd(id,"amx_kick #%d Dein Niveau ist auf unserem Server unerwuenscht!", get_user_userid(id))
}
__________________
blaah is offline
Send a message via ICQ to blaah
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 07-14-2004 , 20:42  
Reply With Quote #2

this should work
Code:
if(count[id] >= 4){    console_cmd(id,"amx_kick #%d %s",get_user_userid(id), "Dein Niveau ist auf unserem Server unerwuenscht!") }
__________________
alias White Panther
karlos is offline
blaah
Member
Join Date: Jun 2004
Location: germany
Old 07-15-2004 , 14:12  
Reply With Quote #3

no, this doesn't work
i've just tryed it


can you explain me how to choose a random player? i tryed this..

Code:
new rnd = 0;
new res = 0;
while(res == 0){
	rnd = 0
	rnd = random(15);
	new player = get_user_health(rnd)
	if (!player){
		client_print(0,print_chat,"%d %d exists",rnd, player);
	}else{
		res = rnd;
		client_print(0,print_chat,"%d %d dont exists",rnd, player);
	}
}
but the given result is not right
__________________
blaah is offline
Send a message via ICQ to blaah
devicenull
Veteran Member
Join Date: Mar 2004
Location: CT
Old 07-15-2004 , 14:25  
Reply With Quote #4

use if (is_user_connected(id))
__________________
Various bits of semi-useful code in a bunch of languages: http://code.devicenull.org/
devicenull is offline
Reply



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 14:41.


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