Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
well,i made an object system,and i am making a command for admins,when i write it and write the other player's id,he will have access to the object id i write,but how to make that it saves the access,and player can have unlimited accesses to object ids?please help
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
.....how could my code help?are you guys just posting things that you dont know the meaning of?
All i am asking about is how to make for each player to have access to unlimited object ids...
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
Let me explain,well,i have made system for creating objects,i have a command for moving the objects,but i need to make like ONLY if you have access to that object id you can move it,but how can i create that each player can have access to unlimited objects ids?
Posts: 58
Threads: 10
Joined: Apr 2011
Reputation:
0
If I am right, you cant have "unlimited" objects. As samp limits the amount of created objects to 2000 only.
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
....first of all i didnt say i want players to have unlimited objects,i said i want to make that players can have access yo unlimited objects,like they can have alot of accesses to objects to move them....
Posts: 58
Threads: 10
Joined: Apr 2011
Reputation:
0
Ok, from what I understood from u, as u refused to post code, that u r making an object creation system and you can give players access to the object manually but the problem is players can access only one object id at once... well I think in this case you can make an arrayed variable that will store the objectids that each player can access and when they try to access an object the server checks if the objectid is in the array. If that did nt help plz post code dont worry
Posts: 362
Threads: 46
Joined: Jul 2013
Reputation:
0
Use something like:
new PlayerObject[MAX_PLAYERS];
and when you create the player object it should be
PlayerObject[playerid] = CreateDynamicObject(......);
Then when a player tries to move an object you can check if he can or not by doing this
if(objectid == PlayerObject[playerid] )
// Move object.
Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
well,thats what i thought of,but i wanna save them too,so at loading/saving it would take alot of time,blackm is there any other way?