some help
#1

Hello iwant to start With add cmds it's Easy just want to know how so

can some one help me on it ineed to add /me and /do and /n (Newibe)
Reply
#2

These tutorials will help you :-

https://sampforum.blast.hk/showthread.php?tid=319000

https://sampforum.blast.hk/showthread.php?tid=348307

You will need ZCMD(These tutorials will help you learn the basics)

* gtakillerIV Command using ZCMD:-

Код:
CMD:me(playerid, params[])
{
		new sendername[MAX_PLAYER_NAME], string[56];
	    GetPlayerName(playerid, sendername, sizeof(sendername));
		if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFF,"Syntax error.Correct usage: /me [text]");
		format(string, sizeof(string), "%s %s", sendername, params);
		SendClientMessageToAll(Yellow, string);
		return 1;
}
Reply
#3

Yeah just this gtakillerIV said...
Reply
#4

* BlueGames CMD ...
PHP код:
    if(strcmp(cmd"/me"true)==0){
        if(
PlayerTemp[playerid][muted]==0){
            new 
tmp[256];
            
tmp strrest(cmdtext,idx);
            if(!
strlen(tmp)){
                
SendClientUsage(playeridcmd"[msg]");
                return 
1;
            }
            if(
FindIP(tmp))
            {
               
KickReas("[SERVER]",playerid,"Attempting to advertise IP's!");
               return 
1;
            }
            else{
                new 
mestr[256],sender[MAX_STRING];
                if(
PlayerTemp[playerid][hname]==1myStrcpy(sender,"Stranger");
                else 
myStrcpy(sender,NameEx(playerid));
                
format(mestr,sizeof(mestr),"%s %s",sender,tmp);
                
SetPlayerChatBubble(playeridmestrCOLOR_ME2100.010000);
                
NearMessage(playerid,mestr,COLOR_ME2);
                return 
1;
            }
        }
        else
        {
            
SendClientError(playerid,"You have been muted");
        }
    return 
1;
     } 
/do CMD ...
PHP код:
        if(strcmp(cmd"/do"true)==0){
        if(
PlayerTemp[playerid][muted]==0){
            new 
tmp[256];
            
tmp strrest(cmdtext,idx);
            if(!
strlen(tmp)){
                
SendClientUsage(playeridcmd"[msg]");
                return 
1;
            }
            if(
FindIP(tmp))
            {
               
KickReas("[SERVER]",playerid,"Attempting to advertise IP's!");
               return 
1;
            }
            else{
                new 
mestr[256],sender[MAX_STRING];
                if(
PlayerTemp[playerid][hname]==1myStrcpy(sender,"Stranger");
                else 
myStrcpy(sender,NameEx(playerid));
                
format(mestr,sizeof(mestr),"((%s)) %s",sender,tmp);
                    
SetPlayerChatBubble(playeridmestrCOLOR_ME2100.010000);
                
NearMessage(playerid,mestr,COLOR_ME2);
                return 
1;
            }
        }
        else
        {
            
SendClientError(playerid,"You have been muted");
        }
    return 
1;
     } 
Next time use wiki or something.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)