AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to use the function "strcat"? (https://forums.alliedmods.net/showthread.php?t=41355)

supersky 07-13-2006 13:01

how to use the function "strcat"?
 
I searched the functions and found the function "strcat".
But I don't know how to use it. And there is no example yet.
Give me example,please!
I want to connect 2 strings such as "[Unreg]" and "PlayerName".

v3x 07-13-2006 18:17

Re: how to use the function "strcat"?
 
Use copy()

Code:
new newstr[33] , name[33]; get_user_name(id , name , 32); copy(newstr , 32 , "[Unreg] "); copy(newstr , 32 , name);

GHW_Chronic 07-14-2006 00:04

Re: how to use the function "strcat"?
 
With:
Code:
new name[32] get_user_name(target,name,31)

Use:
Code:
new string[32] format(string,31,"%s %s","[Unreg]",name)
Or:
Code:
new string[32] format(string,31,"[Unreg] %s",name)
Or:
Code:
format(name,31,"[Unreg] %s",name)

supersky 07-14-2006 00:26

Re: how to use the function "strcat"?
 
Thanks a lot.


All times are GMT -4. The time now is 07:58.

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