10.04.2017, 16:39
Compiling command issue
As the title says, I get a few errors and warning when trying to compile a ZCMD command. Here is the command and its warning.
Anyone who fixes this the fastest and the most efficiently will get a +rep. Also, the code for the return part may look fucked but in reality thats how it is in Pawno. I'll give you a snippet of it.
NOTE: I'm not scripting professional, you could call me a novice or a advanced newbie.

(Yes, I do use Notepad++ with the PAWN API.)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ACCEPT DEATH TIMER
I just need a timer for my accept death command. Here it is.
WARNING: Its very simple, no errors with this either.
As the SendClientMessage says, you need to wait 160minutes before it allows you to accept death. This will activate once Injured[playerid] = 1; is activated, which sets its value to 1; once you reach 10hp.
As the title says, I get a few errors and warning when trying to compile a ZCMD command. Here is the command and its warning.
Код:
CG-RP1.pwn(26307) : error 029: invalid expression, assumed zero CG-RP1.pwn(26307) : warning 215: expression has no effect CG-RP1.pwn(26307) : error 001: expected token: ";", but found "return" CG-RP1.pwn(26308) : warning 225: unreachable code
Код:
CMD:reviveplayer(playerid, params[])
{
new id;
if(PlayerInfo[playerid][pMember] < 1 && PlayerInfo[playerid][pMember] <= 7)) return SendClientMessage(playerid, -1, "You're not a Medic or a LSPD/SASD Officer.");
if(sscanf(params, "u", id)) return SendClientMessage(playerid, -1, "SERVER: /reviveplayer [playerid/PartofName]");
Injured[playerid] = 0;
SendClientMessage(id, -1, "You were revived.");
SendClientMessage(playerid, -1, "You revived that player.");
ApplyAnimation(id,"PED","null",0.0,0,0,0,0,0); // would make them stand up i guess
return 1;
}
NOTE: I'm not scripting professional, you could call me a novice or a advanced newbie.
(Yes, I do use Notepad++ with the PAWN API.)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ACCEPT DEATH TIMER
I just need a timer for my accept death command. Here it is.
WARNING: Its very simple, no errors with this either.
Код:
CMD:acceptdeath(playerid, params[])
{
SendClientMessage(playerid, -1, "NOTE: 160 seconds hasn't passed to allow you to accept death!");
//Whatever bullshit has to come here
SendClientMessage(playerid, -1, "NOTE: You have accepted death!");
SetPlayerHealth(playerid, 0.0);
SetPlayerArmour(playerid, 0.0);
Injured[playerid] = 0;
return 1;
}


