12.07.2009, 06:13
Does anyone have it, I need it.
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.
|
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; }
format(string, sizeof(string), "* %s %s", sendername, result);
Originally Posted by ledzep
I do.
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;
}
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.
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. |
Originally Posted by Anarkien
Quote:
It's not a big problem, you just have to indent them. |
Originally Posted by Anarkien
Quote:
It's not a big problem, you just have to indent them. |