19.01.2012, 16:41
(
Last edited by Da' J'; 19/01/2012 at 11:11 PM.
)
Hey again. I've created a command to get off from "auto-crack" (Automaticly sent in "CRACK" animation and frozen if health under 20).
Well, it compiles it with 2 new warnings, but no effect IG. Here's the warnings, and code:
[PAWNO]E:\SA-MP Offical Server\gamemodes\B-RP.pwn(45426) : warning 235: public function lacks forward declaration (symbol "GetUp")
E:\SA-MP Offical Server\gamemodes\B-RP.pwn(45429) : warning 202: number of arguments does not match definition[/PAWNO]
[PAWNO]public GetUp(playerid)
{
new cmd[256];
cmd = strtok(cmd);
if(strcmp(cmd, "/getup", true) == 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health <= 20)
{
SetPlayerHealth(playerid, 25);
TogglePlayerControllable(playerid,1);
}
}
return 1;
}
[/PAWNO]
P.S. If anyone is interested, you can add there a timer for /getup. (1,5 minutes timer) Not needed tho, but if want, go ahead!
Well, it compiles it with 2 new warnings, but no effect IG. Here's the warnings, and code:
[PAWNO]E:\SA-MP Offical Server\gamemodes\B-RP.pwn(45426) : warning 235: public function lacks forward declaration (symbol "GetUp")
E:\SA-MP Offical Server\gamemodes\B-RP.pwn(45429) : warning 202: number of arguments does not match definition[/PAWNO]
[PAWNO]public GetUp(playerid)
{
new cmd[256];
cmd = strtok(cmd);
if(strcmp(cmd, "/getup", true) == 0)
{
new Float:health;
GetPlayerHealth(playerid,health);
if(health <= 20)
{
SetPlayerHealth(playerid, 25);
TogglePlayerControllable(playerid,1);
}
}
return 1;
}
[/PAWNO]
P.S. If anyone is interested, you can add there a timer for /getup. (1,5 minutes timer) Not needed tho, but if want, go ahead!