Please HELP!!! - 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: Please HELP!!! (
/showthread.php?tid=531041)
Please HELP!!! -
YanLanger - 10.08.2014
Код:
new var=gettime() - LastUsed[playerid];
pawn Код:
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(389) : error 017: undefined symbol "LastUsed"
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(389) : warning 215: expression has no effect
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(389) : error 001: expected token: ";", but found "]"
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(389) : error 029: invalid expression, assumed zero
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(389) : fatal error 107: too many error messages on one line
Re: Please HELP!!! -
SickAttack - 10.08.2014
pawn Код:
new LastUsed[MAX_PLAYERS];
Re: Please HELP!!! -
YanLanger - 10.08.2014
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(390) : error 017: undefined symbol "var"
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(397) : warning 225: unreachable code
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(397) : error 029: invalid expression, assumed zero
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(397) : error 017: undefined symbol "HasFullHealth"
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(406) : warning 225: unreachable code
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(406) : error 029: invalid expression, assumed zero
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(406) : error 017: undefined symbol "cmd_ls"
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(406) : error 029: invalid expression, assumed zero
C:\Users\NINA\Desktop\LSGW\gamemodes\LSGW.pwn(406) : fatal error 107: too many error messages on one line
Re: Please HELP!!! -
YanLanger - 10.08.2014
someone!?!
Re: Please HELP!!! -
SickAttack - 10.08.2014
pawn Код:
// On top of your gamemode:
new LastUsed[MAX_PLAYERS];
// Inside your command:
LastUsed[playerid] = gettime(); // Store a unix timestamp in the variable.
if((gettime() - LastUsed[playerid] < 60) // Check if the command was used recently (60 seconds of delay).
Re: Please HELP!!! -
YanLanger - 10.08.2014
Where do i put all dis?
Re: Please HELP!!! -
SickAttack - 10.08.2014
Just read this:
https://sampforum.blast.hk/showthread.php?tid=254915
Re: Please HELP!!! -
YanLanger - 10.08.2014
like this ?
pawn Код:
CMD:hp(playerid,params[])
{
LastUsed[playerid] = gettime(); // Store a unix timestamp in the variable.
if((gettime() - LastUsed[playerid] < 60)
if(var<=(60*3))return SendClientMessage(playerid,-1,"{ff0000}ERROR: You can't use this command right now.");
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -1600);
LastUsed[playerid]=gettime();
return SendClientMessage(playerid,-1,"{00cc00}You have been healed !");
stock HasFullHealth(playerid)
{
static Float:asdHealth;
GetPlayerHealth(playerid, asdHealth);
if(asdHealth >= 99) return true;
else if(asdHealth < 99 && asdHealth != 99) return false;
return 1;
}
Re: Please HELP!!! -
SickAttack - 10.08.2014
pawn Код:
CMD:hp(playerid,params[])
{
new Float:health;
GetPlayerHealth(playerid, health);
if((gettime() - LastUsed[playerid] < 60)) return SendClientMessage(playerid, 0xff0000FF, "ERROR: You can't use this command right now.");
if(health == 100) return SendClientMessage(playerid, 0xff0000FF, "ERROR: Your health is already full.");
SetPlayerHealth(playerid, 100);
GivePlayerMoney(playerid, -1600);
SendClientMessage(playerid, 0x00cc00FF, "You have been healed!");
LastUsed[playerid] = gettime();
return 1;
}
Re: Please HELP!!! -
YanLanger - 10.08.2014
C:\Users\ScoK\Desktop\LSGW\gamemodes\LSGW.pwn(392) : error 001: expected token: ")", but found "return"