View Single Post
Doggg
Member
Join Date: Jun 2018
Old 07-09-2019 , 15:30   Re: how can you scan a variable and then apply it?
Reply With Quote #10

Quote:
Originally Posted by farawayf View Post
PHP Code:

public Action rr(int clientint args) {
    if(
args 1) { 
        
ReplyToCommand(client"[SM] Usage: sm_rr <seconds>"); 
        return 
Plugin_Handled
    } 
    
char value[32]; //also do not forget to increase the size of the array. in your code char size is 4 which is too small.

    
GetCmdArg(1valuesizeof(value));

    
ServerCommand("mp_restartgame %s"value);
    return 
Plugin_Handled;  

thanks,
char array in size of 4 means that it will contain 1 number? (integer byte size is 4)? how should i measure the array size? what 32 means? ofc its not 32 chars because that will be stupid. but what is it?
Doggg is offline