27.02.2010, 11:10
pawn Код:
#include <a_samp>
#define FILTERSCRIPT
#define COLOR_VILAGOSKEK 0x33CCFFAA
public OnPlayerConnect(playerid)
{
new Float: minHP;
GetPlayerHealth(playerid, minHP);
if(minHP <= 20.0)
{
ApplyAnimation(playerid, "CRACK", "crckdeth1", 4.1, 1, 1, 1, 1, 1);
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new giveplayerid, idx, tmp[128], cmd[128];
cmd = strtok(cmdtext, idx);
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
if (strcmp("/segнthelp", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,COLOR_VILAGOSKEK,"Ha valaki йlet csнkja elйri a 20HP-t 5 perce van hogy felsegнtsйk");
SendClientMessage(playerid,COLOR_VILAGOSKEK,"a /felsegit paranccsal. Ha felsegнtettek, az йleted 23HP-ra megy vissza");
return 1;
}
if(strcmp("/segнt", cmd, true) == 0)
{
if(giveplayerid != playerid)
{
SendClientMessage(playerid, 0xFFFF00AA, "Magadat nem segнtheted fel. Hнvj mentőt /service medic !");
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFFFFFAA, "HASZNБLD: /segit [playerid]");
return 1;
}
if(IsPlayerConnected(giveplayerid))
{
SetPlayerHealth(giveplayerid, 25);
ClearAnimations(giveplayerid);
return 1;
}
else
{
SendClientMessage(playerid, 0xAFAFAFAA, "Nincs ilyen ID!");
return 1;
}
}
return 1;
}
return 0;
}
stock strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
i can't fall into the crack anim and i can't help my friend up!(/segit)
Just the /segнthelp is good in this script! can anyone help me out?
I really need a help. Please help me out guys