SA-MP Forums Archive
zcmd help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: zcmd help (/showthread.php?tid=220790)



zcmd help - yarrum3 - 04.02.2011

why wont this work

Код:
CMD:gotoisland(playerid, params[])
{
    new vid = GetPlayerVehicleID(playerid);
	if(IsPlayerInAnyVehicle(playerid)
	{
		GameTextForPlayer(playerid,"You have teleported to Admin Island",4000,6);
		LinkVehicleToInterior(vid,120);
		SetPlayerInterior(playerid,120);
		SetVehiclePos(vid,4981.62255859,-1901.06604004,2.67791414);
		PutPlayerInVehicle(playerid, vid, 0);
		return 1;
	}
	else
	}

		SetPlayerPos(playerid,4981.62255859,-1901.06604004,2.67791414);
		SetPlayerInterior(playerid,120);
		GameTextForPlayer(playerid,"You have teleported to Admin Island",4000,6);
		return 1;
		}
	}
	return 1;
}



Re: zcmd help - HyperZ - 04.02.2011

pawn Код:
CMD:gotoisland(playerid, params[])
{
    if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
    {
        GameTextForPlayer(playerid,"You have teleported to Admin Island",4000,6);
        LinkVehicleToInterior(GetPlayerVehicleID(playerid),120);
        SetPlayerInterior(playerid,120);
        SetVehiclePos(GetPlayerVehicleID(playerid),4981.62255859,-1901.06604004,2.67791414);
        PutPlayerInVehicle(playerid, GetPlayerVehicleID(playerid), 0);
    }
    else
    {
        SetPlayerPos(playerid,4981.62255859,-1901.06604004,2.67791414);
        SetPlayerInterior(playerid,120);
        GameTextForPlayer(playerid,"You have teleported to Admin Island",4000,6);
    }
    return 1;
}