Sorry, but this is like the final thing and then I'm done. Can't say how grateful I would be if someone came with the solution. Here's the pieces of code:
pawn Код:
if (strcmp("/bayonet", cmdtext, true, 8) == 0)
{
if (timercrifle[playerid] == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "You have successfully reloaded your bayonet");
SendClientMessage(playerid, 0xAAAAAAAA, "(( You may only use the bayonet each every six seconds (takes 6sec to reload). ))");
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 33, 1);
timercrifle[playerid] = 1;
SetTimer("Timer2", 6000, false);
}
return 1;
}
pawn Код:
if (strcmp("/usecanon", cmdtext, true, 9) == 0)
{
if (timertest[playerid] == 0)
{
if (IsPlayerInRangeOfPoint(playerid, 2, -1367.7334,-2329.4153,43.6167) || IsPlayerInRangeOfPoint(playerid, 2,
-1367.6199,-2325.1145,43.6338) || IsPlayerInRangeOfPoint(playerid, 2, -1367.5388,-2320.6838,43.6629) || IsPlayerInRangeOfPoint(playerid, 2, -1367.0610,-2311.0056,43.6313) || IsPlayerInRangeOfPoint(playerid, 2, -1366.9612,-2306.8826,43.5795) || IsPlayerInRangeOfPoint(playerid, 2, -1366.8689,-2302.5981,43.5999) || IsPlayerInRangeOfPoint(playerid, 2, -1360.4092,-2302.2817,43.7645) || IsPlayerInRangeOfPoint(playerid, 2, -1350.3254,-2302.6692,43.8080) ||
IsPlayerInRangeOfPoint(playerid, 2, -1340.1608,-2303.2659,43.5959) || IsPlayerInRangeOfPoint(playerid, 2, -1335.8135,-2308.0623,43.5575) || IsPlayerInRangeOfPoint(playerid, 2, -1336.5748,-2318.2117,43.5575) || IsPlayerInRangeOfPoint(playerid, 2, -1336.9384,-2328.4756,43.5575) || IsPlayerInRangeOfPoint(playerid, 2, -1341.9918,-2333.4768,43.6067) || IsPlayerInRangeOfPoint(playerid, 2, -1362.5692,-2332.3665,43.5644))
{
SendClientMessage(playerid, 0xFFFFFFFF, "This canon is ready to use.");
SendClientMessage(playerid, 0xAAAAAAAA, "(( Please, stand at a canon when you use this weapon. ))");
GivePlayerWeapon(playerid, 35, 1);
timertest[playerid] = 1;
SetTimer("Timer1", 60000, false);
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are not near a canon or you have just used a canon, please let it reload.");
SendClientMessage(playerid, 0xAAAAAAAA, "(( It takes sixty seconds for a canon to reload. ))");
}
}
return 1;
}