11.08.2011, 17:21
Код:
public OnPlayerDeath(playerid, killerid, reason) { if(GetPlayerTeam(killerid) == TEAM_GANG) { SendClientMessage(killerid, -1, "You have killed someone you may get caught by the police"); } return 1; }
public OnPlayerDeath(playerid, killerid, reason) { if(GetPlayerTeam(killerid) == TEAM_GANG) { SendClientMessage(killerid, -1, "You have killed someone you may get caught by the police"); } return 1; }
forward DeathMessage();
public OnGameModeInit()
{
// Your random crap goes here
SetTimer("DeathMessage", 30000, false); // Timer is set for 30 seconds; "false" means it won't repeat.
return 1;
}
forward Timer(playerid);
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPlayerTeam(killerid) == TEAM_GANG)
{
SendClientMessage(killerid, -1, "You have killed someone you may get caught by the police");
SetTimerEx("Timer",30000,0,"d",killerid);
}
return 1;
}
public Timer(playerid)
{
//Do what you want to happen here
}
forward Timer(playerid); public OnPlayerDeath(playerid, killerid, reason) { if(GetPlayerTeam(killerid) == TEAM_GANG) { SendClientMessage(killerid, -1, "You have killed someone you may get caught by the police"); SetTimerEx("Timer",30000,0,"d",killerid); } return 1; } public Timer(playerid) { switch(random(3)) { SetPlayerWantedLevel(playerid, 0); SetPlayerWantedLevel(playerid, 1); SetPlayerWantedLevel(playerid, 2); } }