03.08.2017, 15:51
Hello, i have a problem here... The problem is :
I have made an house system script (buy, sell, lock, unlock and etc). But the /lock commands didn"t work as well. When i make an house checkpoint at Original House (Original HOuse at GTA SA Game) and i bought the house, when i want to lock the prop its not working, it says "your property dont have interiors. i know its because i didn't also using commands /addpropint so that will happen. So i think, can i remove the original house interior and make new using /addprop and /addpropint ? if can please tell me how... also i put the script, so if someone can help to rebuild the script without deleted the original prop, please help Thanks a lot
Script :
I have made an house system script (buy, sell, lock, unlock and etc). But the /lock commands didn"t work as well. When i make an house checkpoint at Original House (Original HOuse at GTA SA Game) and i bought the house, when i want to lock the prop its not working, it says "your property dont have interiors. i know its because i didn't also using commands /addpropint so that will happen. So i think, can i remove the original house interior and make new using /addprop and /addpropint ? if can please tell me how... also i put the script, so if someone can help to rebuild the script without deleted the original prop, please help Thanks a lot
Script :
Код:
CMD:lockprop(playerid, params[]) { new playername[25], giveplayer[25], tmp2[256], temp2; GetPlayerName(playerid, playername, MAX_PLAYER_NAME); if (areatype[playerarea[playerid]][0] != AREA_TYPE_PROP) return SendClientMessage2(playerid, COLOR_RED, "You must be at your property to lock it!"); GetPlayerName(playerid, playername, MAX_PLAYER_NAME); if (areatype[playerarea[playerid]][1] != dini_Int(AddDirFile(dir_userfiles, playername), "propowned")) return SendClientMessage2(playerid, COLOR_RED, "You do not own this property!"); format(giveplayer, 10, "prop%d", areatype[playerarea[playerid]][1]); if(!dini_Isset(AddDirFile(dir_propfiles, giveplayer), "interior")) return SendClientMessage(playerid, COLOR_RED,"Your property doesnt have an interior."); temp2 = dini_Int(AddDirFile(dir_propfiles, giveplayer), "interior"); format(tmp2, sizeof(tmp2), "propint%d", temp2); //if(dini_Int(AddDirFile(dir_propints, tmp2), "locked")==1) return SendClientMessage(playerid, COLOR_RED, "ERROR:You Have Already Locked Your Prop."); if(dini_Isset(AddDirFile(dir_propints, tmp2), "Locked")) return SendClientMessage2(playerid, COLOR_RED, "You have already locked your property."); dini_IntSet(AddDirFile(dir_propints, tmp2), "locked", 1); GameTextForPlayer(playerid, "~p~Property locked", 5000, 3); return 1; } CMD:unlockprop(playerid, params[]) { new playername[25], giveplayer[25], tmp2[256], temp2; GetPlayerName(playerid, playername, MAX_PLAYER_NAME); if (areatype[playerarea[playerid]][0] != AREA_TYPE_PROP) return SendClientMessage2(playerid, COLOR_RED, "You must be at your property to unlock it!"); GetPlayerName(playerid, playername, MAX_PLAYER_NAME); if (areatype[playerarea[playerid]][1] != dini_Int(AddDirFile(dir_userfiles, playername), "propowned")) return SendClientMessage2(playerid, COLOR_RED, "You do not own this property!"); format(giveplayer, 10, "prop%d", areatype[playerarea[playerid]][1]); if(!dini_Isset(AddDirFile(dir_propfiles, giveplayer), "interior")) return SendClientMessage(playerid, COLOR_RED,"Your property doesnt have an interior."); temp2 = dini_Int(AddDirFile(dir_propfiles, giveplayer), "interior"); format(tmp2, sizeof(tmp2), "propint%d", temp2); //if(dini_Int(AddDirFile(dir_propints, tmp2), "locked")==0) return SendClientMessage(playerid, COLOR_RED, "ERROR:You Have Already UnLocked Your Prop."); //dini_IntSet(AddDirFile(dir_propints, tmp2), "locked", 0); if(!dini_Isset(AddDirFile(dir_propints, tmp2), "Locked")) return SendClientMessage2(playerid, COLOR_RED, "You have already unlocked your property."); dini_Unset(AddDirFile(dir_propints, tmp2), "Locked"); GameTextForPlayer(playerid, "~p~Property unLocked", 5000, 3); return 1; }