Gate=CreateObject(971, -301.64, 1507.90, 77.91, 0.00, 0.00, 0.00); return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/open", cmdtext, true, 10) ==0) if(!IsPlayerAdmin(playerid)) { SendClientMessage(playerid,0xFF0000AA,"You can't use this command."); return 1; } MoveObject(Gate, -310.7321, 1507.9795, 77.9132 , 3); SendClientMessage(playerid, 0xAA3333AA," You opened the gate"); return 1; } if (strcmp("/close", cmdtext, true, 10) ==0) if(!IsPlayerAdmin(playerid)) { SendClientMessage(playerid,0xFF0000AA,"You can't use this command."); return 1; } MoveObject(Gate, -301.6442, 1507.8981, 77.9132 , 3); SendClientMessage(playerid, 0xAA3333AA,"You closed the Gate"); return 1; }
if(strcmp(cmdtext, "/open", true, 10) ==0)
if (strcmp("/open", cmdtext, true, 10) ==0)
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/open", cmdtext, true, 10) ==0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You can't use this command.");
MoveObject(Gate, -310.7321, 1507.9795, 77.9132 , 3);
SendClientMessage(playerid, 0xAA3333AA," You opened the gate");
return 1;
}
if (strcmp("/close", cmdtext, true, 10) ==0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000AA,"You can't use this command.");
MoveObject(Gate, -301.6442, 1507.8981, 77.9132 , 3);
SendClientMessage(playerid, 0xAA3333AA,"You closed the Gate");
return 1;
}
return 1;
}
Well use the below code.It must work
pawn Код:
|
Los Santos [Modified] [WIP].pwn(476) : warning 217: loose indentation Los Santos [Modified] [WIP].pwn(474) : warning 217: loose indentation Los Santos [Modified] [WIP].pwn(466) : warning 217: loose indentation