12.08.2015, 23:22
Try this:
And read this: https://sampwiki.blast.hk/wiki/Control_Structures#else
and this: https://sampwiki.blast.hk/wiki/Control_Structures#else_if
PHP код:
if(strcmp("/open police", cmdtext, true, 10) == 0)
{
if(GetPlayerSkin(playerid)!=280) return SendClientMessage(playerid, COLOR_ERROR,"You are not a cop");
if(IsPlayerInRangeOfPoint(playerid, 3.0, 1151.2433,-1226.3589,17.2747));
{
MoveDynamicObject(copgate, 1151.3508, -1222.7382, 9.6951, 3);
SendClientMessage(playerid, COLOR_BLUE, "Gate: Opened.");
}
else
{
SendClientMessage(playerid, COLOR_RED, "You are not near the gate.");
}
return 1;
}
and this: https://sampwiki.blast.hk/wiki/Control_Structures#else_if

