Mask problem - 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: Mask problem (
/showthread.php?tid=585593)
Mask problem -
radiobizza - 15.08.2015
When you are in the car and type the command, do not put the mask. But when the car outside the command goes.
What can I do?
PHP код:
CMD:mask(playerid,params[])
{
if(PlayerInfo[playerid][pMask] == 1 || Mask[playerid] == 1)
{
if(MaskOn[playerid] == 0)
{
MaskOn[playerid] = 1;
GameTextForPlayer(playerid, "~p~MASK ON", 5000, 3);
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, 0);
}
}
else if(MaskOn[playerid] == 1)
{
MaskOn[playerid] = 0;
GameTextForPlayer(playerid, "~p~MASK OFF", 5000, 3);
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, 1);
}
return 1;
}
else return SCM(playerid, COLOR_LIGHTRED, "Nu ai o masca.");
}
Re: Mask problem -
Sellize - 15.08.2015
PHP код:
CMD:mask(playerid,params[])
{
if(!IsPlayerInAnyVehicle(playerid))
{
if(PlayerInfo[playerid][pMask] == 1 || Mask[playerid] == 1)
{
if(MaskOn[playerid] == 0)
{
MaskOn[playerid] = 1;
GameTextForPlayer(playerid, "~p~MASK ON", 5000, 3);
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, 0);
}
}
else if(MaskOn[playerid] == 1)
{
MaskOn[playerid] = 0;
GameTextForPlayer(playerid, "~p~MASK OFF", 5000, 3);
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, 1);
}
return 1;
}
else return SCM(playerid, COLOR_LIGHTRED, "Nu ai o masca.");
}
else return SCM(playerid, COLOR_LIGHTRED, "You cannot do this inside a vehicle.");
}
Re: Mask problem -
radiobizza - 15.08.2015
I want to work in a vehicle..
Re: Mask problem -
radiobizza - 17.08.2015
bump
Re: Mask problem -
ZToPMaN - 17.08.2015
try to make a command for a veh, and command for the player when he is not in veh. then check @_@
just add the command in the veh " if(IsPlayerInAnyVehicle(playerid)) "
and the command for the player outsid the vehile " if(!IsPlayerInAnyVehicle(playerid)) "
Re: Mask problem -
Beckett - 17.08.2015
Do you want the command not to be processed in a vehicle, or you're trying to use it in a vehicle and it doesn't work?
Re: Mask problem -
radiobizza - 18.08.2015
I trying to use it in a vehicle and outside the vehicle and it doesn't work in vehicle