OnPlayerKeyStateChange..-.-
#1

sick much, wtf is wrong?

Код:
44588 = public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)

if(newkeys == KEY_SECONDARY_ATTACK)
{
if(IsPlayerInRangeOfPoint(playerid, 3.0, 2807.9685,-1176.7283,25.3800))
{
SetPlayerPos(playerid, 2807.9685,-1176.7283,25.3800 );
SetPlayerInterior(playerid, 2);
GameTextForPlayer(playerid, "Vagos", 3000, 1); 
return 1; 
}
}
44588 = if(newkeys == KEY_SECONDARY_ATTACK)
{
44590 = if(IsPlayerInRangeOfPoint(playerid, 3.0, 2215.454833,-1147.475585,1025.796875))
{
SetPlayerPos(playerid, 2808.1072,-1178.0325,25.3698); 
SetPlayerInterior(playerid, 0); 
GameTextForPlayer(playerid, "Los Santos", 3000, 1); 
44595 = return 1; 
}
}
( 44588 ) : warning 209: function "OnPlayerKeyStateChange" should return a value
( 44588 ) : error 010: invalid function or declaration
( 44590 ) : error 010: invalid function or declaration
( 44595 ) : error 010: invalid function or declaration
Reply
#2

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_SECONDARY_ATTACK)
    {
	if(IsPlayerInRangeOfPoint(playerid, 3.0, 2807.9685,-1176.7283,25.3800))
	{
	  SetPlayerPos(playerid, 2807.9685,-1176.7283,25.3800 );
	  SetPlayerInterior(playerid, 2);
	  GameTextForPlayer(playerid, "Vagos", 3000, 1); 
        }

    if(IsPlayerInRangeOfPoint(playerid, 3.0, 2215.454833,-1147.475585,1025.796875))
    {
	SetPlayerPos(playerid, 2808.1072,-1178.0325,25.3698); 
	SetPlayerInterior(playerid, 0); 
	GameTextForPlayer(playerid, "Los Santos", 3000, 1);
     }}
        return true; 
}
Now will by work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)