PHP код:
#include <a_samp>
#include <AutoMove> //make sure that you have YSI
#define FILTERSCRIPT
public OnFilterScriptInit()
{
CreateAutoObject(0, 971, 2127.21655, 1913.26990, 13.35634, 0.00000, 0.00000, 4.02577, -1, -1, 100.0, 15.0, 2116.99609, 1912.27893, 13.35634, 0.00000, 0.00000, 4.02577, 3);
//usage CreateAutoObject(id, modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, Float:stream_distance, Float:move_distance, Float:tox, Float:toy, Float:toz, Float:torx, Float:tory, Float:torz, Float:move_speed);
return 1;
}
public OnAutoObjectOpen(playerid, auto_objectid)
{
new name[24];
switch(auto_objectid)
{
case 0: //checking if the auto object id is 0
{
GetPlayerName(playerid, name, sizeof(name)); //getting player name
if(strcmp(name, "seyed", true) != 0) return CloseAutoObject(0); //if doesnt match close gate if match gates will open
}
}
return 1;
}