16.03.2013, 08:28
hello, how i could do this code working ?
i want to do if player pres num 4 open gates if it closed and close gates if it's opened, but i have an error
i want to do if player pres num 4 open gates if it closed and close gates if it's opened, but i have an error
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_ANALOG_LEFT ))
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, 1587.9688,-1722.7001,1449.6000))//6carter
{
if(PlayerInfo[playerid][pJailAccess] < 1) return SCM(playerid, COLOR_RED,"You don't have a key.");
{
if(GetObjectPos(GATE6, 1587.9688,-1722.7001,1449.6000)) MoveObject(GATE6,1587.89941406,-1718.39941406,1448.59997559,2.0); SCM(playerid,0xFFFFFFFF,"closing!");
if(GetObjectPos(GATE6, 1587.89941406,-1718.39941406,1448.59997559)) MoveObject(GATE6,1587.9688,-1722.7001,1449.6000,2.0); SCM(playerid,0xFFFFFFFF,"opening!");
}
}
return 1;
}
Код:
(342) : error 035: argument type mismatch (argument 2) (343) : error 035: argument type mismatch (argument 2)

