Put a passing id and quest name in a clientr.var.
wnpc:
PHP Code:
function onActionServerside()
{
switch (params[0])
{
case "addQuest":
temp.checkQuest = req("SELECT rowid FROM Quests WHERE name = '" @params[1]@ "'", true);
if (temp.checkQuest != null)
{
temp.holder.addarray({temp.checkQuest, params[1]});
echo(temp.holder);
clientr.activeQuests.add(temp.addArray);
}
break;
The rowid is obvious what it is, 0; 1; 2; ect.
The params sent in the test I'm doing is from.....
same wnpc (clientside):
PHP Code:
// Function to add in quests
public function addQuest(temp.questName)
{
if (temp.questName in clientr.activeQuests)
{
return "active";
}else
{
triggerServer("gui", this.name, "addQuest", temp.questName);
}
}
(which obviously the first if statement isn't working b/c the array is jacked)
and that temp.questName is coming from a level npc joined class as....
class:
PHP Code:
//#CLIENTSIDE
function onCreated()
{
this.quest = "Fake Quest 1";
}
function onPlayerTouchsMe()
{
findweapon("-System/QuestTracker").addQuest(this.quest);
}
for now nothing is set on the level npc itself, it's set in the class, just trying to get it to work first...