What wrong with it? -
Chris_Morrison - 26.08.2011
Hi
i did new LSPD HQ and the /enter bugged
pawn Код:
if(strcmp(cmd, "/enter", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,2,1554.6105,-1675.4493,16.1953))
{
SetPlayerPos(playerid,246.7302,107.6626,1003.2188)
SetPlayerInterior(playerid,3);
}
return 1;
}
it's not respond just keep stand there
Re: What wrong with it? -
Gagi_Corleone - 26.08.2011
Maybe you put the wrong coordinates.
Try this and check If you're not on the coordinates client send you this: Yes wrong coordinates
Код:
if(strcmp(cmd, "/enter", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,2,1554.6105,-1675.4493,16.1953)) return SendClientMessage(playerid, -1,"Yes wrong coordinates");
SetPlayerPos(playerid,246.7302,107.6626,1003.2188)
SetPlayerInterior(playerid,3);
return 1;
}
Re: What wrong with it? -
Chris_Morrison - 26.08.2011
all fine with the coordnates i check it out 3 times
Re: What wrong with it? -
Gagi_Corleone - 26.08.2011
Quote:
Originally Posted by Chris_Morrison
all fine with the coordnates i check it out 3 times
|
Check if you already have a command /enter if you have put a different command not /enter. The code is all right.
Re: What wrong with it? -
[LoD]Hauke - 26.08.2011
The syntax looks quite correctly to me.
Try to use a float as the second param at IsPlayerInRangeOfPoint. So use 2.0 as 2.
Re: What wrong with it? -
Kaperstone - 26.08.2011
try with zcmd
pawn Код:
CMD:enter(playerid, params[])
{
if(!IsPlayerInRangeOfPoint(playerid,2,1554.6105,-1675.4493,16.1953)) return SendClientMessage(playerid, -1,"Yes wrong coordinates");
SetPlayerPos(playerid,246.7302,107.6626,1003.2188)
SetPlayerInterior(playerid,3);
return 1;
}
Re: What wrong with it? -
Chris_Morrison - 26.08.2011
Quote:
Originally Posted by Gagi_Corleone
Maybe you put the wrong coordinates.
Try this and check If you're not on the coordinates client send you this: Yes wrong coordinates
Код:
if(strcmp(cmd, "/enter", true) == 0)
{
if(!IsPlayerInRangeOfPoint(playerid,2,1554.6105,-1675.4493,16.1953)) return SendClientMessage(playerid, -1,"Yes wrong coordinates");
SetPlayerPos(playerid,246.7302,107.6626,1003.2188)
SetPlayerInterior(playerid,3);
return 1;
}
|
It's won't work
anyone else?
Re: What wrong with it? -
Kaperstone - 26.08.2011
Quote:
Originally Posted by Chris_Morrison
It's won't work
anyone else?
|
test mine
(2 posts above this post)
Re: What wrong with it? -
Chris_Morrison - 26.08.2011
Quote:
Originally Posted by xkirill
test mine
(2 posts above this post)
|
not work
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(26570) : error 017: undefined symbol "enter"
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(26579) : warning 225: unreachable code
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(26570) : warning 203: symbol is never used: "CMD"
Re: What wrong with it? -
Kaperstone - 26.08.2011
Quote:
Originally Posted by Chris_Morrison
not work
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(26570) : error 017: undefined symbol "enter"
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(26579) : warning 225: unreachable code
C:\Program Files\San Andreas\сшбш\gamemodes\M-RP.pwn(26570) : warning 203: symbol is never used: "CMD"
|
download
zcmd.inc