02.06.2015, 10:20
Why not working my code here:
and photo 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=0; i<MAX_PLAYERS; i++){
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;
}