29.03.2015, 20:11
(
Последний раз редактировалось SukMathcuck; 29.03.2015 в 21:42.
)
Resolvido!
public OnPlayerKeyStateChange(playerid,newkeys,oldkeys) { new targetplayer = GetPlayerTargetPlayer(playerid) ; if ( (oldkeys & KEY_JUMP) && (newkeys & KEY_HANDBRAKE) ) { if (targetplayer != INVALID_PLAYER_ID) { new otherplayer = INVALID_PLAYER_ID ; for (new J = GetMaxPlayers(), i; i != J; i++) { if (!IsPlayerConnected(i)) continue; if (GetPlayerState(i) != PLAYER_STATE_ONFOOT) continue; if (GetPlayerTargetPlayer(i) == targetplayer) { otherplayer = i; break; } } if (otherplayer != INVALID_PLAYER_ID) { SendClientMessage(playerid, COLOR_BLACKRED, "<!> Rendered Player!"); SendClientMessage(otherplayer, COLOR_BLACKRED, "<!> Rendered Player!"); SetPlayerSpecialAction(targetplayer,SPECIAL_ACTION_HANDSUP); } else SendClientMessage(playerid, COLOR_BLACKRED, "You need two players aiming to render a victim"); } } return 1; }