27.12.2010, 23:07
These checkpoints only seem to work for id 0 and nobody eles.
Thanks in advance.
Thanks in advance.
pawn Код:
//onplayerconnect
ammuentrance[playerid] = CreateDynamicCP(-2024.0315, 395.4877, 35.1719, 1.0, -1,-1, -1, 20.0);
ammuexit[playerid] = CreateDynamicCP(284.7085, -41.5060, 1001.5156, 1.0, -1,-1, -1, 20.0);
gunshop[playerid] = CreateDynamicCP(295.5286, -38.5149, 1001.5156, 1.0, -1,-1, -1, 20.0);
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(checkpointid == ammuentrance[playerid])
{
if(walkinammu[playerid] == 1)
{
SetPlayerPos(playerid, 286.148986,-40.644397,1001.515625);
SetPlayerInterior(playerid, 1);
inammu[playerid] = 1;
walkinammu[playerid] = 0;
}
else
{
SendClientMessage(playerid, COLOR_RED,"You need to wait 3 mins before walking into ammu-nation again!");
}
}
if(checkpointid == ammuexit[playerid])
{
if(boughtguns[playerid] == 1)
{
SetPlayerInterior(playerid, 0);
inammu[playerid] = 0;
walkinammu[playerid] = 0;
leaveammu(playerid);
SetTimerEx("walkinammutimer", 180000, false, "d" , playerid);
}
else
{
SendClientMessage(playerid, COLOR_RED,"You cannot go out to battle with no weapons!");
}
}
if(checkpointid == gunshop[playerid])
{
SendClientMessage(playerid, COLOR_WHITE,"Please choose your weapons!");
ShowPlayerDialog(playerid,GUNSHOP,DIALOG_STYLE_LIST,"Weapon Store","Shotguns\nMachine Guns","Buy", "Cancel");
}
return 1;
}