PHP код:
if(!strcmp(cmdtext, "/shayopen", true)) // By dylan
{
if(IsPlayerConnected(playerid))
{
if(IsPlayerInRangeOfPoint(playerid, 15, 311.20001220703, -1141.9000244141, 86.199996948242) || IsPlayerInRangeOfPoint(playerid, 6,311.8377,-1142.1458,5028.0552))
{
new
name[ MAX_PLAYER_NAME ]
;
GetPlayerName( playerid, name, MAX_PLAYER_NAME );
if( !strcmp( name, "kepa333", true ) ) SendClientMessage( playerid, -1, "Hello keppa!" );
else SendClientMessage( playerid, -1, "You're not kepa." );
if(shay1 == 0)
{
MoveDynamicObject(shaygate1, 311.89999389648, -1142.8000488281, 5026.5, 50.7500);
SendClientMessage(playerid, COLOR_BLUE,"Gate is open");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s takes his/her remote control and opens Gate.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
shay1 = 1;
}
else
{
MoveDynamicObject(shaygate1, 311.20001220703, -1141.9000244141, 50.199996948242, 50.0000);
SendClientMessage(playerid, COLOR_BLUE,"Gate is closed");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s takes his/her remote control and closes Gate.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
shay1 = 0;
}
}
}
return 1;
}
it does show that im not the right guy but it still opens...