AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [kick players] little question (https://forums.alliedmods.net/showthread.php?t=3790)

blaah 07-14-2004 18:26

[kick players] little question
 
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))
}


karlos 07-14-2004 20:42

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!") }

blaah 07-15-2004 14:12

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

devicenull 07-15-2004 14:25

use if (is_user_connected(id))


All times are GMT -4. The time now is 14:41.

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