/b = local occ chat [HELP]+Rep!
#1

Hey anybody can help me ?? i got prob making an Local occ chat

i want it like this

/b [text]

or /ooc [text]

but in strcmp how can i make it to strcmp
can someone show me ??
Sorry for my bad English
Reply
#2

Try checking out the tutorial in my signature. It covers everything have to do with RP chats.
Reply
#3

READ THIS BEFORE POSTING! (RULES TO FOLLOW)

c) Help yourself
-Follow the READ ME FIRST! thread
-Use the search option
-Read the wiki
Reply
#4

Wrong
Reply
#5

pawn Код:
if(!strcmp(cmdtext, "/ooc", true,4)){
    if(!strlen(cmdtext[4])) SendClientMessage(playerid, 0xffffffff, "USAGE: /ooc [text]");
    else {
        new tmp[192];
        GetPlayerName(playerid,tmp,24);
        format(tmp,192,"((OOC - %s: %s))",tmp,cmdtext[5]);
        SendClientMessageToAll(0xFFFFFFAA,tmp);
        print(tmp);
    }
    return 1;
 }
Reply
#6

Quote:
Originally Posted by sampmark05
Посмотреть сообщение
Код:
if(strcmp(cmd, "/b", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	        if(gPlayerLogged[playerid] == 0)
	        {
	            SendClientMessage(playerid, COLOR_GREY, "   You havent logged in yet !");
	            return 1;
	        }
			GetPlayerName(playerid, sendername, sizeof(sendername));
			new length = strlen(cmdtext);
			while ((idx < length) && (cmdtext[idx] <= ' '))
			{
				idx++;
			}
			new offset = idx;
			new result[96];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_WHITE, "USAGE: /b [local ooc chat]");
				return 1;
			}
			if(PlayerInfo[playerid][pMask] == 1) format(string, sizeof(string), "Stranger: (( %s ))", result);
			else format(string, sizeof(string), "%s: (( %s ))", sendername, result);
			ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
		}
		return 1;
	}
Now why in the world would you post code for a newbie, that obviously won't work? Assuming all the original poster will do is copy/paste, the last thing we need is for him to paste incomplete code into his script, and come back here whining with 1247364178923561487134916234897152378492368 errors.
Reply
#7

Quote:
Originally Posted by VincentDunn
Посмотреть сообщение
Now why in the world would you post code for a newbie, that obviously won't work? Assuming all the original poster will do is copy/paste, the last thing we need is for him to paste incomplete code into his script, and come back here whining with 1247364178923561487134916234897152378492368 errors.
Sorry Vincent.
Reply
#8

oh hmm
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)