Command problem need HELP! -
ZBits - 01.07.2012
Hello Guys i am new on this forum i dont know if this is the right place to post this topic
i have a problem
with this code
Код:
if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 247.1555,62.7755,1003.6406))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1552.3853,-1675.4354,16.1953);
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 246.5596,108.2807,1003.2188))
{
SetPlayerPos(playerid,-1605.5900,712.0562,13.8672);
SetPlayerFacingAngle(playerid,6.7303);
SetPlayerInterior(playerid,0);
}
else
SendClientMessage(playerid,0xFFFFFFFF,"Not Near Exit Point");
return 1;
}
this is to exit LSPD and SFPD doors/interiors
but when i do /exit,i exit but it still says me "Not Near Exit Point"
and
Код:
if (strcmp("/duty", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 255.2998,75.6383,1003.6406))
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Cop Duty","LSPD Officer\nSFPD Officer\nLVPD Officer","Select","Cancel");
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 233.3887,125.0445,1003.2188))
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Cop Duty","LSPD Officer\nSFPD Officer\nLVPD Officer","Select","CanSendCcel");
}
else
SendClientMessage(playerid,COLOR_PINK2,"Not in Changing Room");
return 1;
}
and in this when i do /duty in sfpd it doesnt say "not in changing room"
but when i do /duty in lspd it says "not in changing room" but i can go on duty in both PD
please i need help.
Alot of thanks to whom who helps me
Re: Command problem need HELP! - Jarnu - 01.07.2012
pawn Код:
if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 247.1555,62.7755,1003.6406))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1552.3853,-1675.4354,16.1953);
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 246.5596,108.2807,1003.2188))
{
SetPlayerPos(playerid,-1605.5900,712.0562,13.8672);
SetPlayerFacingAngle(playerid,6.7303);
SetPlayerInterior(playerid,0);
}
else
{
SendClientMessage(playerid,0xFFFFFFFF,"Not Near Exit Point");
}
return 1;
}
if (strcmp("/duty", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 255.2998,75.6383,1003.6406))
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Cop Duty","LSPD Officer\nSFPD Officer\nLVPD Officer","Select","Cancel");
}
if(IsPlayerInRangeOfPoint(playerid, 7.0, 233.3887,125.0445,1003.2188))
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Cop Duty","LSPD Officer\nSFPD Officer\nLVPD Officer","Select","CanSendCcel");
}
else
{
SendClientMessage(playerid,COLOR_PINK2,"Not in Changing Room");
}
return 1;
}
maybe done.. u missed one bracket under else.
Re: Command problem need HELP! -
ZBits - 01.07.2012
it still does here is the screen shot
Re: Command problem need HELP! -
MadeMan - 01.07.2012
Use this format:
if
else if
else
pawn Код:
if (strcmp("/exit", cmdtext, true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 247.1555,62.7755,1003.6406))
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid, 1552.3853,-1675.4354,16.1953);
}
else if(IsPlayerInRangeOfPoint(playerid, 7.0, 246.5596,108.2807,1003.2188))
{
SetPlayerPos(playerid,-1605.5900,712.0562,13.8672);
SetPlayerFacingAngle(playerid,6.7303);
SetPlayerInterior(playerid,0);
}
else
SendClientMessage(playerid,0xFFFFFFFF,"Not Near Exit Point");
return 1;
}
same with /duty
Re: Command problem need HELP! -
ZBits - 01.07.2012
OMG!!!!!!!!!!!!! Thanks man thanks for this great help i did not even notice it