03.12.2010, 05:15
Im trying to decrease wanted level and my code just not working :S
Any help??
Any help??
pawn Код:
#include <a_samp>
#define YELLOW 0xFFFF00FF
public OnGameModeInit()
{
SetTimer("wantedto5",120000,true);
SetTimer("wanted5to4",120000,true);
SetTimer("wanted4to3",120000,true);
SetTimer("wanted3to2",120000,true);
SetTimer("wanted2to1",120000,true);
SetTimer("wanted1to0",120000,true);
return 1;
}
forward wantedto5(playerid);
public wantedto5(playerid)
{
if(GetPlayerWantedLevel(playerid) >= 6)
{
SetPlayerWantedLevel(playerid,5);
SendClientMessage(playerid, YELLOW,"[WANTED] You Have Lost A Wanted Level![Level 5]");
}
}
forward wanted5to4(playerid);
public wanted5to4(playerid)
{
if(GetPlayerWantedLevel(playerid) == 5)
{
SetPlayerWantedLevel(playerid,4);
SendClientMessage(playerid, YELLOW,"[WANTED] You Have Lost A Wanted Level![Level 4]");
}
}
forward wanted4to3(playerid);
public wanted4to3(playerid)
{
if(GetPlayerWantedLevel(playerid) == 4)
{
SetPlayerWantedLevel(playerid,3);
SendClientMessage(playerid, YELLOW,"[WANTED] You Have Lost A Wanted Level![Level 3]");
}
}
forward wanted3to2(playerid);
public wanted3to2(playerid)
{
if(GetPlayerWantedLevel(playerid) == 3)
{
SetPlayerWantedLevel(playerid,2);
SendClientMessage(playerid, YELLOW,"[WANTED] You Have Lost A Wanted Level![Level 2]");
}
}
forward wanted2to1(playerid);
public wanted2to1(playerid)
{
if(GetPlayerWantedLevel(playerid) == 2)
{
SetPlayerWantedLevel(playerid,1);
SendClientMessage(playerid, YELLOW,"[WANTED] You Have Lost A Wanted Level![Level 1]");
}
}
forward wanted1to0(playerid);
public wanted1to0(playerid)
{
if(GetPlayerWantedLevel(playerid) == 1)
{
SetPlayerWantedLevel(playerid,0);
SendClientMessage(playerid, YELLOW,"[WANTED] You Have Lost Your Wanted Level![Innocent]");
}
}