19.03.2010, 21:24
How does my pawno code must look so the LSP gates can be opened by everybody not only by cops !?
Here's the actual pawno code
Here's the actual pawno code
Код:
if (strcmp(cmd, "/open", true) ==0) { if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1 || gTeam[playerid] == TEAM_ARMY && PlayerInfo[playerid][pRank] == 2) { new Float:gatex, Float:gatey, Float:gatez; if(city == 1) { gatex = 1539.709717; gatey = -1627.873047; gatez = 14.057503; } if(city == 2) { gatex = -1571.661133; gatey = 665.627869; gatez = 6.354377; } if(PlayerToPoint(25, playerid, gatex, gatey, gatez)) { OpenPoliceDepartmentGate(); SetTimer("ClosePoliceDepartmentGate", 7500, false); SendClientMessage(playerid, COLOR_YELLOW,"You have successfully opened this gate."); return 1; } if(PlayerToPoint(25, playerid, -1701.720825, 680.697083, 24.057503)) { OpenPoliceDepartmentGate2(); SetTimer("ClosePoliceDepartmentGate2", 7500, false); SendClientMessage(playerid, COLOR_YELLOW,"You have successfully opened this gate."); return 1; } else { SendClientMessage(playerid, COLOR_RED,"You are not at a gate. Try closer if you are."); } } else { SendClientMessage(playerid, COLOR_RED,"You are not a part of the cops or army team."); } return 1; } if (strcmp(cmd, "/close", true) ==0) { if(gTeam[playerid] == TEAM_COP && PlayerInfo[playerid][pRank] == 1 || gTeam[playerid] == TEAM_ARMY && PlayerInfo[playerid][pRank] == 2) { new Float:gatex, Float:gatey, Float:gatez; if(city == 1) { gatex = 1539.709717; gatey = -1627.873047; gatez = 14.057503; } if(city == 2) { gatex = -1571.661133; gatey = 665.627869; gatez = 6.354377; } if(PlayerToPoint(25, playerid, gatex, gatey, gatez)) { ClosePoliceDepartmentGate(); SendClientMessage(playerid, COLOR_YELLOW,"You have successfully closed this gate."); return 1; } if(PlayerToPoint(25, playerid, -1701.720825, 680.697083, 24.057503)) { ClosePoliceDepartmentGate2(); SendClientMessage(playerid, COLOR_YELLOW,"You have successfully closed this gate."); return 1; } else { SendClientMessage(playerid, COLOR_RED,"You are not at a gate. Try closer if you are."); } } else { SendClientMessage(playerid, COLOR_RED,"You are not a part of the cops or army team."); } return 1; }