14.02.2012, 16:32
Behave that I'm new to PAWN.
So, what I'm trying to do is simply print how long a guy has survived, but it doesnt seem to allow me to run the "/startround" command, and I don't know how to increase the new "count" variable.
So, what I'm trying to do is simply print how long a guy has survived, but it doesnt seem to allow me to run the "/startround" command, and I don't know how to increase the new "count" variable.
pawn Код:
// New variables
new count=0;
// Forwards
forward SurvivedTime(playerid);
public SurvivedTime(playerid)
{
count + 1; // expression has no effect
printf("The murderer has stayed alive for %d seconds!", count);
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/startround", true))
{
SetTimerEx("SurvivedTime", 1000, false, "is", 1337, "hello!");
return 1;
}
return 0;
}