17.04.2010, 17:53
__________________________________________________ ______________________
Aqui o Cуdigo Tente Este:
Dever Ser Colocado Abaixo de:
Caso de Erro Entгo Coloque Isto Abaixo para Garantir:
Aqui o Cуdigo Tente Este:
pawn Код:
if(strcmp(cmd, "/curar", true) == 0)
{
new Float:health; //New para as Variveis
new tmp2[256]; //new para Variaveis
tmp = strtok(cmdtext, idx);
new otherplayer; //Outros Players
tmp2 = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF444499, "/curar PlayerID");
if(!strlen(tmp2)) return SendClientMessage(playerid, 0xFF444499, "/curar PlayerID");
if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, 0xFF444499, "id invalido.");
if (health < 50.0)
SetPlayerHealth(otherplayer, 100);
return 1;
}
//----
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
pawn Код:
new cmd[256];
new tmp[256];
new Message[256];
new gMessage[256];
new pName[MAX_PLAYER_NAME+1];
new iName[MAX_PLAYER_NAME+1];
new idx;