25.12.2014, 12:02
Hey.
i want to show my driving license to other player but this not work correct.
Example: My driving license: Passed
i want to show it to other player then it not work and it's sayd not passed
And the other problem is that. Threshold give me a code, i want that the only vehicle owner can start vehicle and he made it, but now is the problem about faction. If im leader at LSPD then and try to start LSPD faction vehicle then it's sayd i dont have key for this vehicle.
Here's the code.
Sorry about my english, i really hope you understand what i want to say.
i want to show my driving license to other player but this not work correct.
Example: My driving license: Passed
i want to show it to other player then it not work and it's sayd not passed
Код:
CMD:n2ita(playerid, params[]) { new string[128], playerb; if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "Sa pead logima enne sisse."); if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "KASUTA: /nдita [ID]"); if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Viga mдngija ID's."); if(!IsPlayerNearPlayer(playerid, playerb, 2)) return SendClientMessage(playerid, COLOR_GREY, "Sa oled liiga kaugel mдngijast."); //if(!PlayerInfo[playerid][pCarLic]) return SendClientMessage(playerid, COLOR_GREY, "You don't have a drivers license."); format(string, sizeof(string), "* %s nдitab oma juhilube %s'le.", RPN(playerid), RPN(playerb)); if(PlayerInfo[playerid][pMaskOn] == 1) { format(string, sizeof(string), "* Nдitab oma juhilube %s'le.", RPN(playerb)); } else { format(string, sizeof(string), "* %s nдitab oma juhilube %s'le", RPN(playerid), RPN(playerb)); } SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); new text1[20]; new text2[20]; new text3[20]; if(PlayerInfo[playerb][pCarLic]) { text1 = "Lдbitud"; } else { text1 = "Pole"; } if(PlayerInfo[playerid][pFireArmsLic]) { text2 = "Lдbitud"; } else { text2 = "Pole"; } if(PlayerInfo[playerid][pPilotLic]) { text3 = "Lдbitud"; } else { text3 = "Pole"; } SendClientMessage(playerb, COLOR_YELLOW, "[Los Santos ARK]"); format(string, sizeof(string), "Nimi: {FFFFFF}%s", RPN(playerid)); SendClientMessage(playerb, COLOR_YELLOW, string); format(string, sizeof(string), "Vanus: {FFFFFF}%d", PlayerInfo[playerid][pAge]); SendClientMessage(playerb, COLOR_YELLOW, string); format(string, sizeof(string), "Juhiload: {FFFFFF}%s.", text1); SendClientMessage(playerb, COLOR_YELLOW, string); format(string, sizeof(string), "Tulirelva omamis luba: {FFFFFF}%s.", text2); SendClientMessage(playerb, COLOR_YELLOW, string); format(string, sizeof(string), "Piloodiluba: {FFFFFF}%s.", text3); SendClientMessage(playerb, COLOR_YELLOW, string); return 1; }
Here's the code.
Код:
if(newkeys & KEY_SUBMISSION) // New Engine HotKey { if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command."); if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return SendClientMessage(playerid, COLOR_GREY, "You are not driving a vehicle."); new vehicleid = GetPlayerVehicleID(playerid); switch(GetVehicleModel(vehicleid)) { case 509, 481, 510: return SendClientMessage(playerid, COLOR_GREY, "Bicycles have no engine."); default: { new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); if(vehicleid == PlayerInfo[playerid][pVeh]) doors = PlayerInfo[playerid][vLocked]; else if(vehicleid == PlayerInfo[playerid][pVVeh]) doors = PlayerInfo[playerid][vVLocked]; else if(vehicleid == PlayerInfo[playerid][pBVeh]) doors = PlayerInfo[playerid][vBLocked]; else return SendClientMessage(playerid, COLOR_GREY, "This is not your car!"); new string[60]; if(PlayerInfo[playerid][pMaskOn]) string = (engine) ? ("* keeras sььte vдlja.") : ("* kдivitas mootori."); else format(string, sizeof(string), (engine) ? ("* %s keeras sььte vдlja.") : ("* %s sisestas vхtme ja keeras sььdet"), RPN(playerid)); SendNearbyMessage(playerid, 15, string, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE, COLOR_PURPLE); SetVehicleParamsEx(vehicleid, (engine) ? (0) : (1), lights, alarm, doors, bonnet, boot, objective); } } }