[Ayuda] Comando /intentar
#10

Bueno no estoy seguro porque no puedo probar el codigo pero creo que asi se arregla:

pawn Код:
if(strcmp(cmd, "/intentar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " No te has Logeado !");
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, "USA: /intentar [accion]");
return 1;
}
new which_message = random(2);
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(which_message == 0)
{
 format(string, sizeof(string), "*%s intenta %s y lo logra", name, result);
 ProxDetector(30.0,playerid,string,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);
 return 1;
}
if(PlayerInfo[playerid][pMaskuse] == 1)
 {
   format(string, sizeof(string), "*Extraсo intenta %s y lo logra", name, result); ProxDetector(30.0,playerid,string,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN,COLOR_GREEN);
   return 1;
}
else if(which_message == 1)
{
 format(string, sizeof(string), "*%s intenta %s y falla", name, result);
 ProxDetector(30.0,playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
 return 1;
 }
if(PlayerInfo[playerid][pMaskuse] == 1)
 {
 format(string, sizeof(string), "*Extraсo intenta %s y falla", name, result); ProxDetector(30.0,playerid,string,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
 return 1;
}
}
return 1;
}
return 0;
}
Reply


Messages In This Thread
[Ayuda] Comando /intentar - by Unwritten - 16.11.2009, 21:29
Re: [Ayuda] Comando /intentar - by pooooolo - 16.11.2009, 21:53
Re: [Ayuda] Comando /intentar - by Unwritten - 16.11.2009, 22:08
Re: [Ayuda] Comando /intentar - by Laconcha - 17.11.2009, 01:39
Re: [Ayuda] Comando /intentar - by Unwritten - 17.11.2009, 08:32
Re: [Ayuda] Comando /intentar - by Laconcha - 17.11.2009, 15:52
Re: [Ayuda] Comando /intentar - by Unwritten - 17.11.2009, 16:08
Re: [Ayuda] Comando /intentar - by Laconcha - 17.11.2009, 16:21
Re: [Ayuda] Comando /intentar - by Unwritten - 17.11.2009, 16:39
Re: [Ayuda] Comando /intentar - by Laconcha - 17.11.2009, 17:09

Forum Jump:


Users browsing this thread: 1 Guest(s)