CMD:hangup(playerid, params[]){new targetid = PlayerData[playerid][pCallLine];SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE);SetTimerEx(\"RemoveAttachedObject\", 1500, false, \"dd\", playerid, 6);if (PlayerData[playerid][pEmergency] || PlayerData[playerid][pPlaceAd]){ PlayerData[playerid][pEmergency] = 0; PlayerData[playerid][pPlaceAd] = 0; SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, \"** %s elrakja telefonját a zsebébe.\", ReturnName(playerid, 0));}if (PlayerData[playerid][pIncomingCall]){ SendClientMessage(playerid, COLOR_YELLOW, \"[TELEFON]:{FFFFFF} Kinyomtad a bejővő hívást.\"); SendClientMessage(targetid, COLOR_YELLOW, \"[TELEFON]:{FFFFFF} Kinyomták a telefont.\"); KillTimer(CallTimer[playerid]);KillTimer(CallTimer[targetid]);SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, \"** %s előveszi telefonját, megnézi, majd kinyomja a hívást.\", ReturnName(playerid, 0));} else { SendClientMessage(playerid, COLOR_YELLOW, \"[TELEFON]:{FFFFFF} Leraktad a telefont.\"); SendClientMessage(targetid, COLOR_YELLOW, \"[TELEFON]:{FFFFFF} Lerakták a telefont.\"); KillTimer(CallTimer[playerid]);KillTimer(CallTimer[targetid]); SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, \"** %s elrakja telefonját a zsebébe.\", ReturnName(playerid, 0)); SendNearbyMessage(targetid, 30.0, COLOR_PURPLE, \"** %s elrakja telefonját a zsebébe.\", ReturnName(targetid, 0));}PlayerData[playerid][pIncomingCall] = 0;PlayerData[targetid][pIncomingCall] = 0;PlayerData[playerid][pCallLine] = INVALID_PLAYER_ID;PlayerData[targetid][pCallLine] = INVALID_PLAYER_ID;return 1;}
CB-be minden esetben kiírja valamiért, hogy Server unknown command.
CMD:hangup(playerid, params[]){ params[0] = PlayerData[playerid][pCallLine]; SetPlayerSpecialAction(playerid, SPECIAL_ACTION_STOPUSECELLPHONE); SetTimerEx(\"RemoveAttachedObject\", 1500, false, \"dd\", playerid, 6); if (PlayerData[playerid][pEmergency] || PlayerData[playerid][pPlaceAd]) { PlayerData[playerid][pEmergency] = 0; PlayerData[playerid][pPlaceAd] = 0; SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, \"** %s elrakja telefonját a zsebébe.\", ReturnName(playerid, 0)); } if (PlayerData[playerid][pIncomingCall]) { SendClientMessage(playerid, COLOR_YELLOW, \"[TELEFON]:{FFFFFF} Kinyomtad a bejővő hívást.\"); SendClientMessage(params[0], COLOR_YELLOW, \"[TELEFON]:{FFFFFF} Kinyomták a telefont.\"); KillTimer(CallTimer[playerid]); KillTimer(CallTimer[params[0]]); SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, \"** %s előveszi telefonját, megnézi, majd kinyomja a hívást.\", ReturnName(playerid, 0)); } else { SendClientMessage(playerid, COLOR_YELLOW, \"[TELEFON]:{FFFFFF} Leraktad a telefont.\"); SendClientMessage(params[0], COLOR_YELLOW, \"[TELEFON]:{FFFFFF} Lerakták a telefont.\"); KillTimer(CallTimer[playerid]); KillTimer(CallTimer[params[0]]); SendNearbyMessage(playerid, 30.0, COLOR_PURPLE, \"** %s elrakja telefonját a zsebébe.\", ReturnName(playerid, 0)); SendNearbyMessage(params[0], 30.0, COLOR_PURPLE, \"** %s elrakja telefonját a zsebébe.\", ReturnName(params[0], 0)); } PlayerData[playerid][pIncomingCall] = 0; PlayerData[params[0]][pIncomingCall] = 0; PlayerData[playerid][pCallLine] = INVALID_PLAYER_ID; PlayerData[params[0]][pCallLine] = INVALID_PLAYER_ID; return 1;}