Command used?
#1

I need something that will help out with commands.

for example

"You have used this command already"
PHP код:
    if(!strcmp(cmdtext"/heal"true4))
    {
        
SetPlayerHealth(playerid100);
        return 
1;
    } 
I need like "Error: You used this command". This would reset onplayerdeath, so when he dies he can use the cmd again
Reply
#2

pawn Код:
//Top of script:
new bool:UsedHeal[MAX_PLAYERS] = false;
//OnPlayerDeath:
UsedHeal[playerid] = false;
//In command:
//Before SetPlayerHealth
if(UsedHeal[playerid]) return SendClientMessage( Here you should send a message saying they can't heal yet );
//After SetPlayerHealth
UsedHeal[playerid] = true;
Reply
#3

coole210 why do all that
like this WITHOUT ALL OF THAT
pawn Код:
if(!strcmp(cmdtext, "/heal", true, 10) == 0)
    {
    SetPlayerHealth(playerid, 100);
    return 1;
    }
Reply
#4

Quote:
Originally Posted by [A]ndrei
Посмотреть сообщение
coole210 why do all that
like this WITHOUT ALL OF THAT
pawn Код:
if(!strcmp(cmdtext, "/heal", true, 10) == 0)
    {
    SetPlayerHealth(playerid, 100);
    return 1;
    }
are you troling or very stupid?
Reply
#5

Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)