Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ______________________________________________________________________________________________________________
- KInclude v1.0
- Created by Killaman
- Functions (v1.0):
- SetPlayerPosEx(playerid, Float:x, Float:y, Float:z, Interior, VirtualWorld); - Ex: SetPlayerPosEx(playerid, 3.0, 4.0, 5.0, 0, 0);
- ClearChatForPlayer(playerid, Lines); - Ex: ClearChatForPlayer(playerid, 16);
- ClearChatForAll(Lines); - Ex: ClearChatForAll(30);
- PlayAudioStreamForAll(url[]); - Ex: PlayAudioStreamForAll("http://lololol.com/song.mp3/);
- StopAudioStreamForAll(playerid); - StopAudioStreamForAll(playerid);
- ______________________________________________________________________________________________________________
- */
- stock SetPlayerPosEx(playerid, Float:x, Float:y, Float:z, Interior, VirtualWorld)
- {
- if (GetPlayerState(playerid) == 2)
- {
- new
- vehicleid = GetPlayerVehicleID(playerid);
- SetVehiclePos(vehicleid, x, y, z);
- LinkVehicleToInterior(vehicleid, Interior);
- SetVehicleVirtualWorld(vehicleid, VirtualWorld);
- }
- else
- {
- SetPlayerPos(playerid, x, y, z);
- SetPlayerInterior(playerid, Interior);
- SetPlayerVirtualWorld(playerid, VirtualWorld);
- }
- return 1;
- }
- stock ClearChatForPlayer(playerid, Lines)
- {
- for(new i = 0; i < Lines; i++) SendClientMessage(playerid, -1, " "); return 1;
- }
- stock ClearChatForAll(Lines)
- {
- for(new i = 0; i < Lines; i++) SendClientMessageToAll(-1, " "); return 1;
- }
- stock PlayAudioStreamForAll(url[])
- {
- for(new i; i < GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i))
- {
- new
- Float:x, Float:y, Float:z, distance;
- x = 0;
- y = 0;
- z = 0;
- distance = 0;
- PlayAudioStreamForPlayer(i, url, x, y, z, distance);
- }
- }
- return 1;
- }
- stock StopAudioStreamForAll()
- {
- for(new i; i < GetMaxPlayers(); i++)
- {
- if(IsPlayerConnected(i))
- {
- StopAudioStreamForPlayer(i);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment