02.03.2013, 12:01
Hello fellow scripts i have maked a moving gate thanks to skillzz but i want only one kind of skin to open the base doors this is the code for my maffia base. Where it says //maffia they the skin i just want the command to work for.
The gate and skin code
please help thank you so much!!
The gate and skin code
PHP код:
new gate1;
public OnGameModeInit()
{
gate1 = CreateObject(969, 2231.45703, -2212.44116, 12.53181, 0.00000, 0.00000, -45.00000);
//the skins i want the command to work for
//Maffia
AddPlayerClass(46, 2128.0320,-2271.5474,20.6719,235.8931,0,0,0,0,0,0);
AddPlayerClass(59, 2128.0320,-2271.5474,20.6719,235.8931,0,0,0,0,0,0);
AddPlayerClass(111, 2128.0320,-2271.5474,20.6719,235.8931,0,0,0,0,0,0);
AddPlayerClass(124, 2128.0320,-2271.5474,20.6719,235.8931,0,0,0,0,0,0);
AddPlayerClass(125, 2128.0320,-2271.5474,20.6719,235.8931,0,0,0,0,0,0);
AddPlayerClass(223, 2128.0320,-2271.5474,20.6719,235.8931,0,0,0,0,0,0);
return 1;
}
//the gate code
//gate1
CMD:closegate(playerid, params[])
{
MoveObject(gate1, 2231.45703, -2212.44116, 12.53181, 1);
SendClientMessage(playerid, 0xEF994300, "Closeing Maffia HQ...");
return 1;
}
CMD:opengate(playerid, params[])
{
MoveObject(gate1, 2231.4570, -2212.4412, 9.3241, 1);
SendClientMessage(playerid, 0xEF994300, "Opening Maffia HQ...");
return 1;
}