20.02.2013, 16:01
I made a gate but it does not move it says your gate is now open and closed but it doesnt move please help here is the code can you Wright a new working please thank you so much guys.
PHP код:
#include <a_samp>
#define FILTERSCRIPT
new gate1;
public OnFilterScriptInit()
{
Gate1 = CreateObject(988, -906.6700, -489.9100, 25.7600, 0.0000, 0.0000, 157.6200);//gate 1
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/open", true)){
if(IsPlayerInRangeOfPoint(playerid, 15.0, -906.6700, -489.9100, 25.7600)){
MoveObject(gate1, -906.6700, -489.9100, 25.7600, 0.0000, 0.0000, 157.6200);
SendClientMessage(playerid, 0x0000BBAA, "the Gate Opened Successfuly , Weclome !");
return 1;
}
}
if(!strcmp(cmdtext, "/close", true)){
if(IsPlayerInRangeOfPoint(playerid, 15.0, -906.6700, -489.9100, 20.8200)){
MoveObject(gate1, -906.6700, -489.9100, 20.8200, 0.0000, 0.0000, 157.6200);
SendClientMessage(playerid, 0xAA3333AA, "the Gate Closed successfuly !");
return 1;
}
}
return 0;
}