09.10.2010, 23:33
I dont know if this message are already psot but i need help to add command to my gate for open it
if (!strcmp("/opengate", cmdtext, true, 9))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z); // X Y and Z mean the Coordinates
// Code Here
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp("/opengate", cmdtext, true, 9))
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, X, Y, Z); // X Y and Z mean the Coordinates
{
MoveObject(playerid, X, Y, Z, Float:Speed);
SendClientMessage(playerid, collor, "You has open the gate."); // change the color what u want, and the coords X,Y and Z, Float:Speed = opening speed of the gate
}else{
SendClientMessage(playerid, collor, "You are not near the gate."); // change the color what u want.
}
}