Hey!
So I tried making a gang war script for DarkRP ( spent a couple hours on it ), pretty simple stuff (so I thought); it was suppose to be a chat command that turned into a UI. Basically if a player is the job "Crip Leader" and types /gangwar Bloodz (or whatever gang it may be) whoever is the "Bloodz Leader" would get a message a little UI notification at the top or bottom right of their screen ( kinda like this https://youtu.be/8adWjQeEjMk?t=149 ) asking them if they want to accept the the gang war invite else saying that no one is a bloodz leader at the moment in chat. If there is indeed a bloodz leader online and he accepted the invite, everyone with TEAM_BLOODZ, including the leader, would be put into a gang war. This would be adverted ( not /advert ) to the all the players in the server. Note: While two gangs are in a gang war FF is off.
Okay now that we got all the information out the way we can move on to the actual reason why I'm on here. First off, I'm not asking for you guys to make the whole script for me ( that would take up wayy to much of your time and I wouldn't be learning anything :P ) I'm simply asking for some pointers, what do I need to use? How should I go about doing this? All the help is greatly appreciated! Thank you.
So I'm working on the script and I can't seem to figure out what to do here.
hastebin
gangwartable = {
[19] = true,
[20] = true,
[21] = true
}
DarkRP.createQuestion("fill this in later", "gangwarquestion",ply, number delay, gangwarscript)
function gangwarcode(ply, args)
if not gangwartable[ply:Team()] then
ChatPrint("fill this in later")
end
end
if args == "" then
ply:ChatPrint("You must specify a gang!")
return ""
end
if args == "crips" then
end
DarkRP.defineChatCommand("gangwar", gangwarcode)
So things looks good but I have a question, if I player is a blood on my server and types /gangwar crips how am I going to notify all the players that are crips with DarkRP.createquestion?
Ah thanks. If I were to use DarkRP.createQuestion what would I put for arg 3 or Player target.
Also when I send the question to the crips how do the bloodz respond? With a another command maybe?
Thank you for all the help. There is one last thing I can't seem to understand, take a look at my updated code: hastebin. I have more than just bloodz and crips as my gangs. I have the bambino's and the yakuza's and maybe the mob (not sure if I'm going to count the mob as a gang or not) so if I'm a yakuza and I want to start a gangwar with the bloodz I type /gangwar bloodz. But in my code the target of the DarkRP.createQuestion is just the variable target, how does lua know which gang I'm targeting if I just have it as target?
Sorry, you need to Log In to post a reply to this thread.