23.05.2009, 12:28
EDIT: I changed a little, but now ther checkpoint wont show
pawn Код:
{
new Menu:CurrentMenu = GetPlayerMenu(playerid);
if(CurrentMenu == Cop)
{
switch(row)
{
case 0:
{
if(IsACop == 1)
{
SendClientMessage(playerid,COLOR_RED2,"You are already a Police officer!");
return 1;
}
IsACop =1;
SendClientMessage(playerid,COLOR_BLUE,"You have been set as a police officer");
}
}
}
if(CurrentMenu == CopMenu)
{
switch(row)
{
case 0:
{
SendClientMessage(playerid,COLOR_YELLOW,"You just got your wage");
return 1;
}
case 1:
{
IsACop = 0;
SendClientMessage(playerid,COLOR_BLUE,"You have resigned as police officer");
return 1;
}
}
}
return 1;
}
pawn Код:
public OnPlayerEnterStreamedCheckpoint(playerid, streamid)
{
if(streamid == CopCheck)
{
if(IsACop == 1)
{
ShowMenuForPlayer(CopMenu,playerid);
return 1;
}
if(IsACop == 0)
ShowMenuForPlayer(Cop, playerid);
return 1;
}
return 1;
}