Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- IndiRightOn[vehicleid] = true;
- //Kierunkowskaz Prawy Przedni
- IndicatorsObject[vehicleid][0] = CreateObject(19294,0,0,0,0,0,0,80);
- AttachObjectToVehicle(IndicatorsObject[vehicleid][0], vehicleid, Indicators[i][PXPP], Indicators[i][PYPP], Indicators[i][PZPP], 0, 0, 0);
- //Kierunkowskaz Prawy Tylny
- IndicatorsObject[vehicleid][1] = CreateObject(19294,0,0,0,0,0,0,80);
- AttachObjectToVehicle(IndicatorsObject[vehicleid][1], vehicleid, Indicators[i][PXPT], Indicators[i][PYPT], Indicators[i][PZPT], 0, 0, 0);
- }else
- {
- IndiRightOn[vehicleid] = false;
- DestroyObject(IndicatorsObject[vehicleid][0]);
- DestroyObject(IndicatorsObject[vehicleid][1]);
- }
- }
- }
- }
- }
- if(newkeys == 1332)
- {
- new vid = GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective;
- GetVehicleParamsEx(vid, engine, lights, alarm, doors, bonnet, boot, objective);
- if(vid == INVALID_VEHICLE_ID)
- return 1;
- if(lights == VEHICLE_PARAMS_OFF)
- {
- GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(vid, engine, VEHICLE_PARAMS_ON, alarm, doors, bonnet, boot, objective);
- SendClientMessage(playerid,COLOR_LIGHTGREEN,"Zapaliłeś Światła!");
- }
- else
- {
- GetVehicleParamsEx(GetPlayerVehicleID(playerid), engine, lights, alarm, doors, bonnet, boot, objective);
- SetVehicleParamsEx(vid, engine, VEHICLE_PARAMS_OFF, alarm, doors, bonnet, boot, objective);
- SendClientMessage(playerid,COLOR_LIGHTRED,"Zgasiłeś Światła!");
- }
- }
- return 1;
- }
- public SendMessageToPolicja(color, string[])
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(gTeam[i] == TEAM_POLICJA)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- return 1;
- }
- public SetupPlayerForClassSelection(playerid)
- {
- SetPlayerPos(playerid, player_x,player_y,player_z);
- SetPlayerFacingAngle(playerid, player_angle);
- SetPlayerCameraPos(playerid, camera_x,camera_y,camera_z);
- SetPlayerCameraLookAt(playerid, player_x,player_y,player_z);
- ApplyAnimation(playerid,"DANCING","DNCE_M_B",4.0,1,0,0,0,-1); //smooth dancing. It's most fitting to the music
- PlayerPlaySound(playerid, 1097,-119.9460,23.1096,12.2238); //music, duh
- //making sure the timer gets executed only once, so the camera doesn't go to fast
- if (PlayerInfo[playerid][SpawnDance]) PlayerInfo[playerid][SpawnTimer] = SetTimerEx("MoveCamera", moving_speed, true, "i", playerid);
- PlayerInfo[playerid][SpawnDance] = false; //preventing the timer to execute again
- return 1;
- } //something I
- stock GetPlayerDistanceToPoint(playerid,Float:x,Float:y) //By Sacky (Edited by Smugller)
- {
- new Float:x1,Float:y1,Float:z1;
- GetPlayerPos(playerid,x1,y1,z1);
- return floatround(floatsqroot((x-x1)*(x-x1)+(y-y1)*(y-y1)));
- }
- #pragma unused strrest
- #pragma unused strtok
- strrest(const string[], index)
- {
- new length = strlen(string),offset = index,result[256];
- while ((index < length) && ((index - offset) < (sizeof(result) - 1)) && (string[index] > '\r'))
- {
- result[index - offset] = string[index];index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- stock GetPlayerSpeedd(playerid){
- new Float:ST[4];
- if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]); else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
- ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 169;
- return floatround(ST[3]);
- }
- public GetDistanceBetweenPlayers(playerid,playerid2){
- new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
- new Float:dis;
- if (!IsPlayerConnected(playerid) || !IsPlayerConnected(playerid2)){
- return 0;
- }
- GetPlayerPos(playerid,x1,y1,z1);
- GetPlayerPos(playerid2,x2,y2,z2);
- dis = floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
- return floatround(dis);
- }
- public BOT() {
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_BLUE,"{ADFF2F}[{FF0000}P{FFFFFF}T{FF0000}R{ADFF2F}]{ADFF2F}{C0C0C0}-|-{C0C0C0}{4169E1}Czat Wyczyszczony{4169E1}{C0C0C0}-|-{C0C0C0}");
- SendClientMessageToAll(COLOR_WHITE," ");
- SendClientMessageToAll(COLOR_WHITE," ");
- }
- stock GetNearestObjectEx(playerid, model, Float:Distance2 = 1000.0)
- {
- Distance2 = floatabs(Distance2);
- if(Distance2 == 0.0) Distance2 = 1000.0;
- new Float:X[2], Float:Y[2], Float:Z[2];
- new Float:NearestPos = Distance2;
- new NearestVehicle = 0;
- GetPlayerPos(playerid, X[0], Y[0], Z[0]);
- for(new i; i < MAX_OBIECTS; i++)
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement