02.06.2015, 10:52
(
Последний раз редактировалось Kaliber; 02.06.2015 в 11:27.
)
Try this:
PS: How do you declared var? I hope #define var new
Код:
#if !defined isnull #define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1])))) #endif CMD:vchat(playerid,params[]){ if(!V[playerid][vlevel]) return EMess(playerid); if(isnull(params)) return SCM(playerid,-1,"Use:/vchat [Text]"); SendMessageToVips(playerid,params); return 1; } //Function here //i like javascript and use #define function%0(%1) forward%0(%1); .. function SendMessageToVips(id,const string[]){ var str[145]; GetPlayerName(id,str,MAX_PLAYER_NAME); format(str,sizeof(str),"{FFFF00}Vip Chat: %s say %s",str,string); for(var i; i<MAX_PLAYERS; i++){ if(!IsPlayerConnected(i) || !V[i][vlevel]) continue; SCM(i,-1,str); } return 1; }