Variables.
#1

Hi guys.

So i got this problem. I want to make one variable for two filterscripts. Is that possible?


In GameMode:
Код:
new Var[MAX_PLAYERS];
In my FilterScript:
Код:
if (strcmp("/cmd", cmdtext, true, 10) == 0)
	{
	if(Var[playerid] == 1){
	SendClientMessage (playerid,COLOR_RED,"No authorization.");
 	return 1;
	}
Reply
#2

Normal variables aren't possible, but I believe PVar's are possible.
Reply
#3

I think it's possible by putting it in include, not sure tho.
Reply
#4

Here's the best choice, put your script together, not in multiple scripts.
Reply
#5

Would it be possible if i would save the variable in a .txt file?

Something like an admin script..
Reply
#6

In a text file? You could, I suppose.
Reply
#7

I would place it all in one script, but i'm just not a messy guy. I like everything clean .

I'l try saving it in a .txt file.. Could someone tell me how could i save the variable in the .txt file.. and how to read from it.
Reply
#8

COMO EU FASSO UM COMANDO PARA O CARRO VIM ATE MIM EU QUERIA BOTA UM COMANDO NO CARMENU Q EU POSSA TRAZER O CARRO ATE MIM TEM COMO ME AJUDA A FAZER ?
Reply
#9

Wtf man? Don't do that.

Use PVars

On Gamemode:
pawn Код:
SetPVarInt(playerid, "Level", 5);
Filterscript:
pawn Код:
if(GetPVarInt(playerid, "Level") == 5)
{
    // Code
}
PVars works for every script loaded.
Reply
#10

Cookie to you!

Edit:

btw,
Quote:
Originally Posted by Reginaldo
Посмотреть сообщение
COMO EU FASSO UM COMANDO PARA O CARRO VIM ATE MIM EU QUERIA BOTA UM COMANDO NO CARMENU Q EU POSSA TRAZER O CARRO ATE MIM TEM COMO ME AJUDA A FAZER ?
Didnt understand a thing you said.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)