11.09.2014, 17:46
I'd recommend converting your gamemode to ZCMD. ZCMD is much more faster then STRCMP, how-ever here it is,
NOTE: You'll need to include the "isnull" function if you don't have it already as it's included with ZCMD.
pawn Код:
if(strcmp(cmd, "/mlift", true) == 0)
{
if (isnull(params)) return SendClientMessage(playerid, -1, Usage: /mlift <up/down>");
if (!strcmp(params, "up", true))
{
if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1569.34424, -2156.86060, 12.96720)) return SendClientMessage(playerid, blue, "You Are Not In Garage!");
MoveObject(MechLift, 1569.34424, -2156.86060, 14.70720, 0.5);
}
else if (!strcmp(params, "down", true))
{
if(!IsPlayerInRangeOfPoint(playerid, 5.0, 1569.34424, -2156.86060, 12.96720)) return SendClientMessage(playerid, blue, "You Are Not In Garage!");
MoveObject(MechLift, 1569.34424, -2156.86060, 12.96720, 0.5);
}
else SendClientMessage(playerid, -1, "usage: up da down!");
return 1;
}