22.02.2011, 09:58
Then try this:
Код:
#include <a_samp> new Poort1; public OnFilterScriptInit() { Poort1 = CreateObject(975,278.785736,-66.147872,1.578125,0.00000000,0.00000000,0.00000000); return 1; } public OnFilterScriptExit() { DestroyObject(Poort1); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { new name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); if(strcmp(cmdtext, "/gateopen", true)==0) { if(strcmp(name, "My_Name",true)==0) { MoveObject(Poort1, 330.42218018,-62.15184784,0.59067321, 5); return 1; } else { SendClientMessage(playerid,0xFF0000FF,"You aren't My_Name!"); return 1; } } if(strcmp(cmdtext, "/gateclose", true)==0) { if(strcmp(name, "My_Name",true)==0) { MoveObject(Poort1, 278.785736,-66.147872,1.578125, 5); return 1; } else { SendClientMessage(playerid,0xFF0000FF,"You aren't My_Name!"); return 1; } } return 0; }