19.11.2013, 06:54
I tried to create moving gate for clan I used strfind but it doesn't work I will ask you to give me example so I will be able to do it myself. This is my first time I used strfind.
new Gate;
new GateStatus;
public OnGameModeInit()
{
Gate = CreateObject(980, 1067.08704, 1359.38843, 12.29745, 0.00000, 0.00000, 0.00000);
return 1;
}
CMD:gate(playerid, params[])
{
new playername[24];
if( strfind( playername, "TAG", true) == -1 )
{
SendClientMessage( playerid, 0xFFFFFFFF, "...................");
return 1;
}
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1067.08704, 1359.38843, 12.29745))
{
if(GateStatus == 0)
{
MoveObject(Gate, 1067.08704, 1359.38843, 6.80000, 2.00);
GateStatus = 1;
}
else
{
MoveObject(Gate, 1067.08704, 1359.38843, 12.29745, 2.00);
GateStatus = 0;
}
}
return 1;
}
new playername[24];
if( strfind( playername, "TAG", true) == -1 )
{
SendClientMessage( playerid, 0xFFFFFFFF, "...................");
return 1;
}