31.05.2011, 16:28
Hello
Is there a way to change that so that I can just press X and then the gate opens/closes instead of using the commands?
pawn Код:
if(strcmp(cmdtext,"/openagate", true) == 0) {
{
if(IsPlayerInRangeOfPoint(playerid, 150000.0, -1395.03, 2850.07, 95.78)) {
MoveObject (AdminGate, -1395.03, 2850.07, 101.43, 3);
SendClientMessage(playerid, COLOR_RED, "Welcome to heaven");
} else {
return SendClientMessage(playerid,0xFFFFFF,"You aren't in range!");
}
}
return 1;
}
if(strcmp(cmdtext,"/closeagate", true) == 0) {
{
if(IsPlayerInRangeOfPoint(playerid, 150000.0, -1395.03, 2850.07, 101.43)) {
MoveObject (AdminGate, -1395.03, 2850.07, 95.78, 3);
SendClientMessage(playerid, COLOR_RED, "The gate is closing! Be back soon sugahpuffs!");
} else {
return SendClientMessage(playerid,0xFFFFFF,"You aren't in range!");
}
}
return 1;
}
return 0;
}