Raised This Month: $ Target: $400
 0% 

Strings and pawn


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
mysticssjgoku4
Veteran Member
Join Date: Jan 2005
Location: Chicago Heights, IL
Old 02-24-2007 , 15:33   Re: Strings and pawn
Reply With Quote #2

Quote:
Originally Posted by sskillz View Post
Hello, I just started making my plugin and its almost complete, I have a string which goes like this: "%STEAMID%STEAMID%STEAMID"

now how I get each STEAMID? and how can I kick each one from the server?
10x ahead It just stupid using string with pawn (sorry I come from per )

Also I could test if a string starts with "CHK" ;\

10x.
Code:
public test(id) {     //Getting the SteamID     new steamid[32] //Must make the variable to hold 32 characters (STRING)     get_user_steamid(id,steamid,31) //GET THE INFO, store it in steamid for a len* of 31. (31 = 32 chars because it starts at 0, not 1)         //Getting a Name     new name[32]     get_user_name(id,name,31)         //Kicking the STEAMID     new target_id = cmd_target(id,steamid) //Player ID     new target_uid = get_user_userid(target_id) //The Player's actual slot ID |Only retrieved for the RAW Kick COmmand|         new command[128]     format(command,127,"kick #%d ^"You have been kicked.^"",target_uid)     server_cmd(command)         //To Add strings together here are some types:     // %s = string     // %f = float     // %i = integer         new combined[80]         //This will produce "STEAMIDSTEAMIDSTEAMID"     format(combined,79,"%s%s%s",steamid,steamid,steamid)         //This will produce "STEAMID STEAMID STEAMID"     format(combined,79,"%s %s %s",steamid,steamid,steamid)         //This will produce "STEAMID STEAMID NAME"     format(combined,79,"%s %s %s",steamid,steamid,name)             //This will produce "STEAMID STEAMID 12"     new num = 12 //This is an integer, notice its not indexed (or is not an array)     format(combined,79,"%s %s %i",steamid,steamid,num)         //This will produce "STEAMID STEAMID 24.5"     new Float:num_float = 24.5 //This is a float, a float is just a decimal number. You must start the new var with "Float:" and it must be a decimal     format(combined,79,"%s %s %f",steamid,steamid,num_float) }
__________________


Last edited by mysticssjgoku4; 02-24-2007 at 15:35.
mysticssjgoku4 is offline
Send a message via AIM to mysticssjgoku4 Send a message via MSN to mysticssjgoku4
 



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 00:45.


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