21.01.2012, 17:17
I Was wondering how to make a gate Open / Close with just 1 CMD , i know how to do it with 2 CMD's like this :
Help would be Appreciated
PHP код:
if(strcmp(cmdtext,"/whogate", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1140.7728,-1206.2294,19.0250))
{
MoveDynamicObject(WHGATE,1141.0118408203, -1206.8706054688, 12.685035705566,1.2);
SendClientMessage(playerid, COLOR_WHITE, "Gate has Been opened.");
GameTextForPlayer(playerid,"~w~ Gate Opened", 5000, 3);
}
return 1;
}
if(strcmp(cmdtext,"/whcgate", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 8.0, 1140.7728,-1206.2294,19.0250))
{
MoveDynamicObject(WHGATE,1141.0118408203, -1206.8706054688, 21.935035705566,1.2);
SendClientMessage(playerid, COLOR_WHITE, "Gate has Been Closed.");
GameTextForPlayer(playerid,"~w~Gate Closed", 5000, 3);
}
return 1;
}