Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new vehid = GetPlayerVehicleID(playerid),
- model = GetVehicleModel(vehid);
- if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
- {
- switch(model) // Modelos dos veiculos da policia/exercito/FBI/Swat
- {
- case 407, 427, 432, 601, 599, 598, 597, 596, 528, 523, 497, 490, 433:
- {
- PlayAudioStreamForPlayer(playerid, "http://relay.radioreference.com:80/il_chicago_police2");
- }
- case 488, 582: //Modelos dos veiculos dos reporters
- {
- PlayAudioStreamForPlayer(playerid, "http://184.154.48.106:9000");
- }
- case 417, 425, 447, 460, 469, 476, 487, 511, 512, 513, 519, 520, 548, 553, 563, 577, 592, 593 : //Modelos de aeronaves
- {
- PlayAudioStreamForPlayer(playerid, "http://ewr2.liveatc.net/sbmt");
- }
- }
- }
- if(oldstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_ONFOOT)
- {
- StopAudioStreamForPlayer(playerid);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment