Posts: 3
Threads: 1
Joined: Jan 2012
Reputation:
0
Hola, estoy en un GM de 0 y he puesto el comando /b y no funciona. Explico, pongo /b y sale por ej: [OOC] [ID:0] Nombre Dice: /b
Osea que en el texto sale /b, y si pongo /b ola me dice que el comando no existe :S
Posts: 3
Threads: 1
Joined: Jan 2012
Reputation:
0
Es asi como yo lo tengo... :S
Posts: 1,461
Threads: 71
Joined: Oct 2010
pawn Код:
if(strcmp(cmd, "/b", true,2) == 0)//local ooc
{
if(IsPlayerConnected(playerid))
{
if(!IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_GREY, " Necesiats logearte antes de usar esto!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
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, "[INFO]: /b [chat OOC]");
return 1;
}
if(PlayerInfo[playerid][pMascara] == 1) // probablemente en tu sv la mascara va a ser differente, fijate si es pMask o como sea.
{
format(string, sizeof(string), "(( [FJ] Extraсo dice: %s ))", result);
}
else
{
format(string, sizeof(string), "(( [FJ] %s dice: %s ))", NombreEx(playerid), result);
}
ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
printf("%s", string);
}
return 1;
}
Este tiene algo diferente que casi ni se nota y por lo tanto si funcionara
Posts: 3
Threads: 1
Joined: Jan 2012
Reputation:
0
Gracias ovanny me sirvio! Me puedes decir que le cambiaste? Y El Bardo prefiero usar STRCMP, pero gracias igualmente