Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- /*================================= Funktionen =================================
- native SetPlayerPosEx(playerid, Float:X, Float:Y, Float:Z, Float:A);
- native SetPlayerInteriorEx(playerid, InteriorID, Float:X, Float:Y, Float:Z, Float:A);
- native SetPlayerWorld(playerid, Virtualworld, Float:X, Float:Y, Float:Z, Float:A); //
- native SetPlayerInteriorWorld(playerid, Virtualworld, InteriorID, Float:X, Float:Y, Float:Z, Float:A);
- native SetVehiclePosEx(playerid, Float:X, Float:Y, Float:Z, Float:A);
- native SetVehicleWorld(playerid, Virtualworld, Float:X, Float:Y, Float:Z, Float:A);
- native GetPlayerIpEx(playerid);
- native GetPlayerNameEx(playerid);
- native FreezePlayer(playerid);
- native UnfreezePlayer(playerid);
- native HealPlayer(playerid);
- native KillPlayer(playerid);
- */
- stock SetPlayerPosEx(playerid, Float:X, Float:Y, Float:Z, Float:A)
- {
- SetPlayerPos(playerid, X, Y, Z);
- SetPlayerFacingAngle(playerid, A);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 0);
- return 1;
- }
- stock SetPlayerWorld(playerid, Virtualworld, Float:X, Float:Y, Float:Z, Float:A)
- {
- SetPlayerVirtualWorld(playerid, Virtualworld);
- SetPlayerPos(playerid, X, Y, Z);
- SetPlayerFacingAngle(playerid, A);
- SetCameraBehindPlayer(playerid);
- SetPlayerInterior(playerid, 0);
- return 1;
- }
- stock SetPlayerInteriorEx(playerid, InteriorID, Float:X, Float:Y, Float:Z, Float:A)
- {
- SetPlayerInterior(playerid, InteriorID);
- SetPlayerPos(playerid, X, Y, Z);
- SetPlayerFacingAngle(playerid, A);
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- stock SetPlayerInteriorWorld(playerid, Virtualworld, InteriorID, Float:X, Float:Y, Float:Z, Float:A)
- {
- SetPlayerVirtualWorld(playerid, Virtualworld);
- SetPlayerInterior(playerid, InteriorID);
- SetPlayerPos(playerid, X, Y, Z);
- SetPlayerFacingAngle(playerid, A);
- SetCameraBehindPlayer(playerid);
- return 1;
- }
- stock SetVehiclePosEx(playerid, Float:X, Float:Y, Float:Z, Float:A)
- {
- if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
- SetVehicleZAngle(GetPlayerVehicleID(playerid), A);
- SetCameraBehindPlayer(playerid);
- }
- else
- {
- TelePlayer(playerid, X, Y, Z, A);
- }
- return 1;
- }
- stock SetVehicleWorld(playerid, Virtualworld, Float:X, Float:Y, Float:Z, Float:A)
- {
- if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- SetPlayerVirtualWorld(playerid, Virtualworld);
- SetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
- SetVehicleZAngle(GetPlayerVehicleID(playerid), A);
- SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), Virtualworld);
- SetCameraBehindPlayer(playerid);
- }
- else
- {
- TelePlayerWorld(playerid, Virtualworld, Float:X, Float:Y, Float:Z, Float:A);
- }
- return 1;
- }
- stock GetPlayerIpEx(playerid)
- {
- new ip[24];
- GetPlayerIp(playerid, ip,sizeof(ip));
- return ip;
- }
- stock GetPlayerNameEx(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid,name,sizeof(name));
- return name;
- }
- stock FreezePlayer(playerid)
- {
- TogglePlayerControllable(playerid, false);
- return 1;
- }
- stock UnfreezePlayer(playerid)
- {
- TogglePlayerControllable(playerid, true);
- return 1;
- }
- stock HealPlayer(playerid)
- {
- SetPlayerHealth(playerid,100.0);
- return 1;
- }
- stock KillPlayer(playerid)
- {
- SetPlayerHealth(playerid,0.0);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment