12.06.2011, 03:01
Look this is my hole code:
Im basically starting a wanted system, when you get killed you get a message "your killer is not on the wanted police list" and when you kill someone it says you are not wanted and gives you a star, but what happens its that when i do /kill it says you are not wanted.
pawn Код:
/*********************************
-COLORS- *
**********************************/
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
#define COLOR_GRAD4 0xD8D8D8FF
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD6 0xF0F0F0FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_DBLUE 0x2641FEAA
#define COLOR_ALLDEPT 0xFF8282AA
//********************************
//********************************
#define FILTERSCRIPT
#include <a_samp>
public OnFilterScriptInit()
{
print("-Wanted Script - LOADED");
return 1;
}
public OnFilterScriptExit()
{
print("-Wanted Script - UNLOADED");
return 1;
}
public OnPlayerConnect(playerid)
{
SetPlayerWantedLevel(playerid, 0);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SetPlayerWantedLevel(playerid, 0);
return 1;
}
public OnPlayerSpawn(playerid)
{
if( GetPlayerSkin( playerid ) >= 280 && GetPlayerSkin( playerid ) <= 288 )
return SendClientMessage( playerid, 0xFF0000FF, "You are now a police officer!" );
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SendClientMessage(playerid, COLOR_GRAD3, "Your killer is now a wanted suspect from the Police!");
SendClientMessage(killerid, COLOR_GRAD3, "You're now a wanted suspect from the Police!");
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
return 1;
}