SA-MP Forums Archive
Map name - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Map name (/showthread.php?tid=654475)



Map name - KinderClans - 29.05.2018

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?


Re: Map name - GTLS - 30.05.2018

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.


Re: Map name - KinderClans - 30.05.2018

Can you make me an example please?


Re: Map name - TadePoleMG - 30.05.2018

I can help you through pms.


Re: Map name - KinderClans - 30.05.2018

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.


Re: Map name - GTLS - 30.05.2018

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.


Re: Map name - TadePoleMG - 30.05.2018

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


Re: Map name - KinderClans - 30.05.2018

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.


Re: Map name - GTLS - 30.05.2018

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.