24.03.2011, 15:35
Hello, i want to make Federal Prision for my GM, but gates aren't moving, what i'm doing wrong?
No errors in GM just gates aren't moving.![Sad](images/smilies/sad.gif)
This is under include a_samp
This is under OnGameModeInit
And cmd is under OnPlayerCommandText
All is in the correct places, but why gates aren't moving ?
No errors in GM just gates aren't moving.
![Sad](images/smilies/sad.gif)
This is under include a_samp
pawn Код:
new fedgate;
pawn Код:
fedgate = CreateDynamicObject(980, -2.437629699707, -267.93731689453, 7.2030787467957, 0, 0, 0);
pawn Код:
if(!strcmp(cmdtext, "/fedopen", true))
{
if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
if (PlayerToPoint(10, playerid,-122.4782,-386.7035,1.4297))
{
MoveDynamicObject(fedgate, -2.437629699707, -267.93731689453, 17.2030787467957, 0);
SendClientMessage(playerid, COLOR_BLUE,"Gates are opening");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s opens gate.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else { SendClientMessage(playerid, COLOR_GREY,"You're too far."); }
}
else return SendClientMessage(playerid, COLOR_GREY,"You don't have keys.");
return 1;
}