20.02.2013, 17:13
Try This
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))
{
SendClientMessage(playerid, 0xAFAFAFAA, " You are not near any gate !");
return 1;
}
MoveDynamicObject(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))
{
SendClientMessage(playerid, 0xAFAFAFAA, " You are not near any gate !");
return 1;
}
MoveDynamicObject(gate1, -906.6700, -489.9100, 20.8200, 0.0000, 0.0000, 157.6200);
SendClientMessage(playerid, 0xAA3333AA, "the Gate Closed successfuly !");
return 1;
}
}
return 0;
}