10 seconds before the command
#1

When the write command /healall, write to all that after 10 seconds will be used command /healall
Reply
#2

You can use timers for it. Something like this:
pawn Код:
CMD:healall(playerid, params[])
{
    SendClientMessage(playerid, COLOR_WHITE, "[SERVER] Everyone is getting healed in 10seconds!");
    SetTimer("heal", 10000, false);
    return 1;
}
 
forward heal();
public heal()
{
    // Here your heal code.
    // Untested
}
Reply
#3

PHP код:
YCMD:healall(playerido[], help)
{
    
#pragma unused help
    #pragma unused o
    
SetTimer("healall"10000false);
    
SendClientMessageToAll(-1,"You will be healed in 10 seconds");
    return 
1;
}
forward healall();
public 
healall()
{
    foreach(
Playeri)
    {
        
SetPlayerHealth(i100);
    }

Too late sorz
Reply
#4

D:\Server\gamemodes\drift.pwn(6253) : warning 202: number of arguments does not match definition
D:\Server\gamemodes\drift.pwn(6253) : error 017: undefined symbol "o"
D:\Server\gamemodes\drift.pwn(6255) : error 017: undefined symbol "help"
D:\Server\gamemodes\drift.pwn(6256) : error 017: undefined symbol "o"
D:\Server\gamemodes\drift.pwn(626 : warning 225: unreachable code
D:\Server\gamemodes\drift.pwn(6253) : warning 203: symbol is never used: "YCMD"
D:\Server\gamemodes\drift.pwn(7657) : error 017: undefined symbol "foreach"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#5

That's because you didn't included YCMD. Download it or use mine ZCMD version.
Include it like:
pawn Код:
#include <ZCMD>
// In the ZCMD case
And place the ZCMD include (use the search function to download it) inside the pawno / includes folder.
Reply
#6

I include YCMD
Код:
#define ycmd(%1) if(!strcmp(cmdtext,%1,true,strlen(%1))&&((!strlen(cmdtext[strlen(%1)])&&format(params,sizeof(params),""))||(cmdtext[strlen(%1)]==' '&&format(params,sizeof(params),"%s",cmdtext[strlen(%1)+1]))))
#define ycmd_red(%1) format(params,sizeof(params),""%1" %s",params),CallLocalFunction("OnPlayerCommandText","ds",playerid,params)
and zcmd
and still the same
Reply
#7

Remove the YCMD thing and replace it with my ZCMD code. And include the ZCMD. Then it's probably working.
Use foreach to heal everyone.
Reply
#8

only #include <zcmd>?
Reply
#9

Yes, then you need to use my ZCMD code.
pawn Код:
CMD:healall(playerid, params[])
{
    SendClientMessage(playerid, COLOR_WHITE, "[SERVER] Everyone is getting healed in 10seconds!");
    SetTimer("heal", 10000, false);
    return 1;
}
 
forward heal();
public heal()
{
    foreach(Player, i)
    {
        SetPlayerHealth(i, 100);
    }
    // Thank you Jafet_Macario
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)