AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Little Help. with these (https://forums.alliedmods.net/showthread.php?t=134448)

dantrix 08-04-2010 18:53

Little Help. with these
 
Hi.. im trie to created a plugin for bind keys automatic, but i have a problem with quotes.

ex:
PHP Code:

public client_connect(id) {
        
client_cmd(id"bind f7 "echo BLOCK";disconnect"

im get error, because just get "bind f7 " <-- . and i need quotes for correctly bind keys in counter-strike console.

some special character or something?

(novice programmer) THX.

nikhilgupta345 08-04-2010 19:03

Re: Little Help. with these
 
Code:

public client_connect(id)
{
client_cmd(id, "bind f7 ^"echo BLOCK;disconnect^"")
}

You use ^"COMMAND^" inside of other quotes to put quotes around those.

minimiller 08-04-2010 19:04

Re: Little Help. with these
 
escape the " that are inside " with a ^
E.g.
client_cmd(id, "bind f7 ^"echo BLOCK^";disconnect");

or use '
E.g.
client_cmd(id, "bind f7 'echo BLOCK';disconnect");

dantrix 08-04-2010 19:38

Re: Little Help. with these
 
Thank you very much!! :):)

fysiks 08-04-2010 20:11

Re: Little Help. with these
 
So pathetic.

vL. 08-04-2010 21:10

Re: Little Help. with these
 
Why are u helping him? Hes slowhacking.


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

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