/do Command
#1

Does anyone have it, I need it.
Reply
#2

Edit the /me command. Place the name at the end & surround it with (( s% )) & the text before. Not really that hard.
Reply
#3

Quote:
Originally Posted by Abernethy
Edit the /me command. Place the name at the end & surround it with (( s% )) & the text before. Not really that hard.
be more specific, I don't see a end where to put it...

Код:
	if(strcmp(cmd, "/do", 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[64];
			while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
			{
				result[idx - offset] = cmdtext[idx];
				idx++;
			}
			result[idx - offset] = EOS;
			if(!strlen(result))
			{
				SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /do [action]");
				return 1;
			}
			format(string, sizeof(string), "* %s %s", sendername, result);
			ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
			printf("%s", string);
		}
		return 1;
	}
Reply
#4

I do.

pawn Код:
format(string, sizeof(string), "* %s %s", sendername, result);
Reply
#5

Quote:
Originally Posted by ledzep
I do.

pawn Код:
format(string, sizeof(string), "* %s %s", sendername, result);
I still dont get it, can you just edit it up?
And I think i fucked it up, can you read it?


C:\Documents and Settings\Owner\My Documents\samp02Xserver.win32\pawno\include\a_samp .inc(19) : fatal error 100: cannot read from file: "string"

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

pawn Код:
if(strcmp(cmd, "/do", 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[64];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /do [action]");
                return 1;
            }
            format(string, sizeof(string), "* %s (( %s ))", result, sendername);
            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
            printf("%s", string);
        }
        return 1;
    }
Try that.
Reply
#7

Getting on the server to test it now.

But i'd love for this to go away

Код:
C:\Documents and Settings\Owner\My Documents\New Folder\pawno\Los Santos Roleplay Beta.pwn(11533) : warning 217: loose indentation
C:\Documents and Settings\Owner\My Documents\New Folder\pawno\Los Santos Roleplay Beta.pwn(11568) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:      6512 bytes
Code size:     1210304 bytes
Data size:     2791304 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4931 cells (19724 bytes)
Total requirements: 4024504 bytes

2 Warnings.
Reply
#8

Quote:
Originally Posted by Kevon
Getting on the server to test it now.

But i'd love for this to go away

Код:
C:\Documents and Settings\Owner\My Documents\New Folder\pawno\Los Santos Roleplay Beta.pwn(11533) : warning 217: loose indentation
C:\Documents and Settings\Owner\My Documents\New Folder\pawno\Los Santos Roleplay Beta.pwn(11568) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:     6512 bytes
Code size:     1210304 bytes
Data size:     2791304 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4931 cells (19724 bytes)
Total requirements: 4024504 bytes

2 Warnings.
You have to show us those two lines then, 11568 and 11533.
It's not a big problem, you just have to indent them.
Reply
#9

Quote:
Originally Posted by Anarkien
Quote:
Originally Posted by Kevon
Getting on the server to test it now.

But i'd love for this to go away

Код:
C:\Documents and Settings\Owner\My Documents\New Folder\pawno\Los Santos Roleplay Beta.pwn(11533) : warning 217: loose indentation
C:\Documents and Settings\Owner\My Documents\New Folder\pawno\Los Santos Roleplay Beta.pwn(11568) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:     6512 bytes
Code size:     1210304 bytes
Data size:     2791304 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4931 cells (19724 bytes)
Total requirements: 4024504 bytes

2 Warnings.
You have to show us those two lines then, 11568 and 11533.
It's not a big problem, you just have to indent them.
Alright here...

if(strcmp(cmd, "/do", true) == 0)

And...

if(strcmp(cmd, "/local", true) == 0 || strcmp(cmd, "/l", true) == 0 || strcmp(cmd, "/say", true) == 0)
Reply
#10

Quote:
Originally Posted by Anarkien
Quote:
Originally Posted by Kevon
Getting on the server to test it now.

But i'd love for this to go away

Код:
C:\Documents and Settings\Owner\My Documents\New Folder\pawno\Los Santos Roleplay Beta.pwn(11533) : warning 217: loose indentation
C:\Documents and Settings\Owner\My Documents\New Folder\pawno\Los Santos Roleplay Beta.pwn(11568) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:      6512 bytes
Code size:     1210304 bytes
Data size:     2791304 bytes
Stack/heap size:   16384 bytes; estimated max. usage=4931 cells (19724 bytes)
Total requirements: 4024504 bytes

2 Warnings.
You have to show us those two lines then, 11568 and 11533.
It's not a big problem, you just have to indent them.
Sorry was lagging
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)