PDA

View Full Version : Help with gate>.<


antoniotono97
18/05/2013, 08:48 AM
I need to make the gate does not open with / ao than the CROUCH key.
And I do not know how....



#include <a_samp>
new gate;
new lift;
forward zatvori();
forward vozila();
#define ZELENO 0x33AA33AA

public OnGameModeInit()
{

CreateObject(869, 982.71508789063, -1534.2990722656, 13.026293754578, 0.000000, 0.000000, 0.000000);
///=======================================vozila===== =======================
SetTimer("vozila",500,0);
AddStaticVehicle(487, 988.79370117188, -1507.15625, 23.98913192749, 0.000000, -1, -1); //vehicle (maverick) (3)
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,ZELENO,"Ovaj Server Koristi AdminBazu by Johnny");
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/ao", cmdtext, true, 10) == 0)
{
MoveObject(gate,1014.82421875, -1542.638671875, 7.0201506614685, 2.00);
SetTimer("zatvori", 8000, 0);
SendClientMessage(playerid,ZELENO,"Otvorio si Kapiju od AdminBaze zatvoriti ce se za 7 sec.");
return 1;
}

if (strcmp("/alift", cmdtext, true, 10) == 0)
{
MoveObject(lift,961.5751953125, -1520.48046875, 23.239595413208, 2.00);
SetTimer("zatvori", 10000, 0);
SendClientMessage(playerid,ZELENO,"Dizes lift admin baze, bice spusten za 7 sec.");
return 1;
}
return 0;
}

public zatvori()
{
MoveObject(lift,961.57562255859, -1520.4810791016, 12.517959594727, 2.00);
MoveObject(gate,1014.8246459961, -1542.6391601563, 14.292015075684, 2.00);
return 1;
}

DiGiTaL_AnGeL
18/05/2013, 08:51 AM
And what's your problem?

P.S. Use

antoniotono97
18/05/2013, 08:58 AM
And what's your problem?

P.S. Use

I need to make the gate does not open with / ao than the CROUCH key.
And I do not know how

antoniotono97
18/05/2013, 09:22 AM
anybody?