help with /heal - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help with /heal (
/showthread.php?tid=296377)
help with /heal -
boyan96 - 11.11.2011
how i can make /help to setplayer HP and armour to 100 but the command to can use every 2 minutes
Re: help with /heal -
Mr_Scripter - 11.11.2011
use
Re: help with /heal -
boyan96 - 11.11.2011
but how i make this but i have pawno is crashing
PHP код:
if(strcmp(cmd,"/heal",true)==0)
{
if(PlayerInfo[playerid][pDonateRank] >= 4)
{
if(GetTickCount() - GetPVarInt(playerid, "heal") < 120000) return SendClientMessage(playerid, 0xFF0000FF, "you must wait 2 minutes");
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid,COLOR_GREEN,"You've set your health and armour to 100");
SetPVarInt(playerid, "heal", GetTickCount());
}
}
return 1;
}
Re: help with /heal -
SmiT - 11.11.2011
Maybe because you have an extra bracket?
pawn Код:
if(strcmp(cmd,"/heal",true)==0)
{
if(PlayerInfo[playerid][pDonateRank] >= 4)
{
if(GetTickCount() - GetPVarInt(playerid, "heal") < 120000) return SendClientMessage(playerid, 0xFF0000FF, "you must wait 2 minutes");
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid,COLOR_GREEN,"You've set your health and armour to 100");
SetPVarInt(playerid, "heal", GetTickCount());
} /* <-------------------- */
}
return 1;
}
Re: help with /heal -
boyan96 - 11.11.2011
again crash wheen i delete the command the gamemode is compile
Re: help with /heal -
Cypress - 11.11.2011
Here you go.
pawn Код:
if(strcmp(cmd,"/heal",true)==0)
{
if(PlayerInfo[playerid][pDonateRank] >= 4)
{
if(GetTickCount() - GetPVarInt(playerid, "heal") < 120000) return SendClientMessage(playerid, 0xFF0000FF, "you must wait 2 minutes");
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid,COLOR_GREEN,"You've set your health and armour to 100");
SetPVarInt(playerid, "heal", GetTickCount());
}
return 1;
}