Problem with /vchat
#1

Why not working my code here:

PHP код:
CMD:vchat(playerid,params[]){
    if(
V[playerid][vlevel] > 0){
        var 
text;
        if(
sscanf(params,"s[40]",text))return SCM(playerid,-1,"Use:/vchat [Text]");
        var 
t[256];
        
format(t,sizeof(t),"%s",text);
        
SendMessageToVips(playerid,t);
    }
    else{
        
EMess(playerid);
    }
    return 
1;
}
//Function here 
//i like javascript and use #define function%0(%1) forward%0(%1); ..
function SendMessageToVips(id,string[]){
    for(var 
i=0i<MAX_PLAYERSi++){
        if(
IsPlayerConnected(i)){
            if(
V[i][vlevel] > 0){
                var 
name[MAX_PLAYER_NAME],str[256];
                
GetPlayerName(id,name,sizeof(name));
                
format(str,sizeof(str),"{FFFF00}Vip Chat: %s say %s",name,string);
                
SCM(i,-1,str);
            }
        }
    }
    return 
1;

and photo here

Reply


Messages In This Thread
Problem with /vchat - by FplayerGR - 02.06.2015, 10:20
AW: Problem with /vchat - by Kaliber - 02.06.2015, 10:52
Re: AW: Problem with /vchat - by FplayerGR - 02.06.2015, 13:24

Forum Jump:


Users browsing this thread: 4 Guest(s)