13.09.2009, 08:29
HI !!! I made a keystate arrest system but it doesnґt works. Why?? PLS HELP
THX
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys == KEY_FIRE + KEY_WALK) { new otherid; new string[85],zname[24],wname[24]; if(GetDistanceBetweenPlayers(playerid,otherid) < 13) { if(gTeam[playerid] == TEAM_POLICE && PlayerInfo[otherid][pWanted] == 1) { GivePlayerMoney(playerid,5000); GetPlayerName(playerid,zname,24); GetPlayerName(otherid,wname,24); format(string,sizeof(string),"%s Policeman has jailed %s .",zname,wname); SendClientMessageToAll(COLOR_ZSARU,string);//format ApplyAnimation(otherid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1); ApplyAnimation(otherid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1); ApplyAnimation(playerid,"ROB_BANK","SHP_HandsUp_Scr", 4.0, 0, 1, 1, 1, 0); ApplyAnimation(playerid,"ROB_BANK","SHP_HandsUp_Scr", 4.0, 0, 1, 1, 1, 0); SetTimer("ArrestAnim",3000,0); GameTextForPlayer(otherid,"BUSTED",3000,4); SetPlayerInterior(otherid,10); SetPlayerPos(otherid,222.7238,111.1816,999.0156); INFO[otherid][Jailtime] = 180; PlayerInfo[otherid][pJailed] = 1; SetTimer("Jail",180000,0); } } }