Load From a Variable
#1

i made a script its called carchase its a hidden car if you find it and drive it you get money but ofc all players chase you so you mustnt get ayawa doing any command so i disabled commands while in it in the main gm but ofc my admin system is in a different fs so i want to do samething there too so i saved the vehicle id in a variable and wanted to load from that variable in the fs to disable commands there but i dont know anything about loading from variables so can anyone help me a wiki link help or anything and thanks
Reply
#2

Sorry if i didn't understand your point, but as far as i understood you you want to disable player commands in your admin filterscript too and only admins are allowed to use cmds so its useless i think, Btw if you still need to block cmds on filterscript too what admin system you are using?
Reply
#3

Quote:
Originally Posted by SilentSoul
Посмотреть сообщение
Sorry if i didn't understand your point, but as far as i understood you you want to disable player commands in your admin filterscript too and only admins are allowed to use cmds so its useless i think, Btw if you still need to block cmds on filterscript too what admin system you are using?
in this carchase cmds must be blocked for all users even admins so i want if an admin finds the car and rides it he cant do all the cmds in the admin system and second its a hand made system i made it so u dont know it if i just got the carchase defined in the admin system ill do
OnPlayerCommandReceived
and if(GetPlayerVehicleId(playerid, vehicleid) = CarChase return 0;
SendClientMessage(Playerid, RED, COMMANDS are Disabled In CarChase);
return 0;
return 1;
thats what i will do thats why i need to load from a var to define the CarChase in the fs if you dont understand anything tell me again :D
Reply
#4

No i hope i really understood you this time, you should do something like this.
pawn Код:
new chasecar;//Global variable in the top of your script!

public OnGameModeInit()
{
    chasecar = CreateVehicle(411,x,y,z,angle,3,3);//here i used the variable and created an infernus for example
    return 1;
}

//Later OnPlayerCommandReceived
{
if(IsPlayerInVehicle(playerid, chasecar)) return SendClientMessage(playerid,RED,"Commands are disabled in carchase!");
}
Reply
#5

Quote:
Originally Posted by SilentSoul
Посмотреть сообщение
No i hope i really understood you this time, you should do something like this.
pawn Код:
new chasecar;//Global variable in the top of your script!

public OnGameModeInit()
{
    chasecar = CreateVehicle(411,x,y,z,angle,3,3);//here i used the variable and created an infernus for example
    return 1;
}

//Later OnPlayerCommandReceived
{
if(IsPlayerInVehicle(playerid, chasecar)) return SendClientMessage(playerid,RED,"Commands are disabled in carchase!");
}
hmmmm ill add some details that will make it easy bro and anyways ill rep+ u for trying your best to help me im trying to load a vehicle id from a variable to use on a fs its saved in a .txt i saved with dini can this become ?
if you help me load it i know the rest but can you? sorry if i was being rude or anything
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)