16.05.2016, 16:13
Hello, i was thinking alot, thinking more of how would my idea work nor can be made. I'am potentially confused and bothered on these kind of features that can possibly added on to my roleplay server. I know this kinda noob question, just dont care about it. Well, basicly i'am critically thinking on this feature (/factions), What does it do? Indeed, in short it shows all the factions , leaders, online members and total members. Im literally thinking this almost a week and i still have no clue how would this work based on my own idea and algorithm/codes. That doesn't mean im new on a typical PAWN language but im totally confused. I mean how could i make this?
My idea:
1. Create the factionlist table in the db.
2. Right after /makeleader command is executed the NAME of the given playerid and should be stored in "leader" row.
3. Then everytime /factions command is executed it will retrieve the data on factionlist table "leader" and should be shown like this one (Los Santos Police Dept. | Leader: %s, RetrieveLeaderRow value or var from factionlist table)
4. How about the total members of faction? (As far as i know, i would need to make a totalmembers row inside the LSPD table from the factionlist table, then increase/decrease the value everytime /accept invite has been executed and will obviously decrease the value everytime /quitfaction has been executed by a player inside the faction.
5. I would also like to make this on every faction such as FBI, SAN NEWS, GOV, and so on. So there would be different table inside the factionlist table such as (LSPD,FBI,LSFMD,Hitman, GOV and San News) every each factions have rows which is (leader,totalmembers, and online members)
I'm not confident with my idea and doesnt support it either, If im wrong please correct me. What i need is the codes and how would i do that? Is it even possible? What are the possible bugs and glitches that i could encounter in the future? I know this is not small favour and it is hardcode. Isn't it?
I would be very grateful and glad if you could show me the step and codes on this kind of idea. Please feel free to post below if you have some opinions and thoughts, i would also provide my necesary codes and commands if asked. Thank you.
My idea:
1. Create the factionlist table in the db.
2. Right after /makeleader command is executed the NAME of the given playerid and should be stored in "leader" row.
3. Then everytime /factions command is executed it will retrieve the data on factionlist table "leader" and should be shown like this one (Los Santos Police Dept. | Leader: %s, RetrieveLeaderRow value or var from factionlist table)
4. How about the total members of faction? (As far as i know, i would need to make a totalmembers row inside the LSPD table from the factionlist table, then increase/decrease the value everytime /accept invite has been executed and will obviously decrease the value everytime /quitfaction has been executed by a player inside the faction.
5. I would also like to make this on every faction such as FBI, SAN NEWS, GOV, and so on. So there would be different table inside the factionlist table such as (LSPD,FBI,LSFMD,Hitman, GOV and San News) every each factions have rows which is (leader,totalmembers, and online members)
I'm not confident with my idea and doesnt support it either, If im wrong please correct me. What i need is the codes and how would i do that? Is it even possible? What are the possible bugs and glitches that i could encounter in the future? I know this is not small favour and it is hardcode. Isn't it?
I would be very grateful and glad if you could show me the step and codes on this kind of idea. Please feel free to post below if you have some opinions and thoughts, i would also provide my necesary codes and commands if asked. Thank you.