21.01.2010, 21:21
olha se eu digitar sу /status manda por o id, agora se eu digitar /status id, por status com o id, mostrando comando invбlido
if(strcmp(cmdtext,"/status",true) == 0)
{
tmp = strtok(cmdtext, idx);
new giveplayerid = ReturnUser(tmp);
//if(!strlen(tmp))
if(!IsPlayerConnected(giveplayerid))
{
SendClientMessage(playerid,0xFFCC2299,"~ [ERRO] Use > /status [id]");
return 1;
}
// else
// if(giveplayerid != INVALID_PLAYER_ID)
// {
new tempstringss[250];
GetPlayerName(giveplayerid,tempstringss,sizeof tempstringss);
new Float:grana = GetPlayerMoney(giveplayerid);
new Float:hvida = GetPlayerHealth(giveplayerid,hvida);
new Float:hcolete = GetPlayerArmour(giveplayerid,hcolete);
format(tempstringss,sizeof(tempstringss),"Assassin atos: %d\nMortes: %d\n Grana: %d\n Health: %d\nColete: %d",Kill,Death,grana,hvida,hcolete);
ShowPlayerDialog(giveplayerid,1,DIALOG_STYLE_MSGBO X,"Status de:%s\n",tempstringss,"OK","FECHAR");
// }
// else //if(giveplayerid == INVALID_PLAYER_ID)
// {
// format(string, sizeof(string), "~ [ERRO] '%d' nгo й um player ativo!", giveplayerid);
// SendClientMessage(playerid, 0xFFCC2299, string);
// }
return 1;
}
if(strcmp(cmdtext,"/status",true) == 0)
{
tmp = strtok(cmdtext, idx);
new giveplayerid = ReturnUser(tmp);
//if(!strlen(tmp))
if(!IsPlayerConnected(giveplayerid))
{
SendClientMessage(playerid,0xFFCC2299,"~ [ERRO] Use > /status [id]");
return 1;
}
// else
// if(giveplayerid != INVALID_PLAYER_ID)
// {
new tempstringss[250];
GetPlayerName(giveplayerid,tempstringss,sizeof tempstringss);
new Float:grana = GetPlayerMoney(giveplayerid);
new Float:hvida = GetPlayerHealth(giveplayerid,hvida);
new Float:hcolete = GetPlayerArmour(giveplayerid,hcolete);
format(tempstringss,sizeof(tempstringss),"Assassin atos: %d\nMortes: %d\n Grana: %d\n Health: %d\nColete: %d",Kill,Death,grana,hvida,hcolete);
ShowPlayerDialog(giveplayerid,1,DIALOG_STYLE_MSGBO X,"Status de:%s\n",tempstringss,"OK","FECHAR");
// }
// else //if(giveplayerid == INVALID_PLAYER_ID)
// {
// format(string, sizeof(string), "~ [ERRO] '%d' nгo й um player ativo!", giveplayerid);
// SendClientMessage(playerid, 0xFFCC2299, string);
// }
return 1;
}