Map name
#1

So, i'm creating a mini missions server. I have the core as filterscript (which handles login, register, commands etc). Andthe mini games are in a separate gamemodes.

Imagine i have a game called "Bombing", is it possibile. on the main core fs, to set a message like: "You're currently playing bombing"...? Probably using CallRemoteFunction.

In short: In the minigame (separate gamemode) there is the bombing game, i need to show the message "You're currently playing bombing" on the main core fs, instead of adding it in every minigame.

How?
Reply
#2

Yes Using SetPVarInt and GetPVarInt, Variables can be passed through different scripts. you can use that to check if they are not in any other Game.
Reply
#3

Can you make me an example please?
Reply
#4

I can help you through pms.
Reply
#5

Quote:
Originally Posted by TadePoleMG
Посмотреть сообщение
I can help you through pms.
Thank you for your help but all you did was asking me to help so i can be the "manager" of your server. No but thank you anyway.

I just need need for what i asked, nothing else. If you wish to help me, make it in this topic.
Reply
#6

No. Use SAMP Wiki to learn your self. If someone else makes codes for you, you will never learn.

@TadePOleMG You should encourage people to learn instead of just giving them ready code.
Reply
#7

Thank You GTLS but Sometimes helping others will give me peace, enjoy.But Ty from now i can encourage others.
Reply
#8

Quote:
Originally Posted by GTLS
Посмотреть сообщение
No. Use SAMP Wiki to learn your self. If someone else makes codes for you, you will never learn.

@TadePOleMG You should encourage people to learn instead of just giving them ready code.
I haven't asked for the FULL code. I just asked for an example.
Reply
#9

Umm, For example,

PHP код:
//Race.pwn
public OnPlayerEnterRace(playerid)
{
    
SCM(playerid, -1"You have Joined Race. ");
    
SetPVarInt(playerid"InsideRace"1);
}

CMD:quitrace(playeridparams[])
{
   if(
GetPVarInt(playerid"InsideRace"
   { 
         
SetPVarInt(playerid"InsideRace"0);
         
SCM(playerid, -1"You left Race, you can join DM now.");
         return 
1;
   }
   else return 
SCM(playerid, -1"You are not in a Race to quit");
}



//DM.pwn

CMD:joindm(playeridparams[])
{
      if(
GetPVarInt(playerid"InsideRace")) return SCM(playerid, -1"You are already inside race. You have to quit first.");

Thats just an example how PVars work. They are like new InsideRace[MAX_PLAYERS] but can be used inside different filterscripts. They also get automatically reset when a player disconnect. You can search forums of Visit Wiki to learn more about PVars.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)