Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerUpdate(playerid)
- {
- if(GetTickCount() - IsAttached[playerid] > 113)
- {
- new weaponid[13],weaponammo[13],pArmedWeapon;
- pArmedWeapon = GetPlayerWeapon(playerid);
- GetPlayerWeaponData(playerid,1,weaponid[1],weaponammo[1]);
- GetPlayerWeaponData(playerid,2,weaponid[2],weaponammo[2]);
- GetPlayerWeaponData(playerid,4,weaponid[4],weaponammo[4]);
- GetPlayerWeaponData(playerid,5,weaponid[5],weaponammo[5]);
- if(weaponid[1] && weaponammo[1] > 0)
- {
- if(pArmedWeapon != weaponid[1])
- {
- if(!IsPlayerAttachedObjectSlotUsed(playerid,0))
- {
- SetPlayerAttachedObject(playerid,0,GetWeaponModel(weaponid[1]),1, 0.199999, -0.139999, 0.030000, 0.500007, -115.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid,0))
- {
- RemovePlayerAttachedObject(playerid,0);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,0))
- {
- RemovePlayerAttachedObject(playerid,0);
- }
- if(weaponid[2] && weaponammo[2] > 0)
- {
- if(pArmedWeapon != weaponid[2])
- {
- if(!IsPlayerAttachedObjectSlotUsed(playerid,1))
- {
- SetPlayerAttachedObject(playerid,1,GetWeaponModel(weaponid[2]),8, -0.079999, -0.039999, 0.109999, -90.100006, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,1))
- {
- RemovePlayerAttachedObject(playerid,1);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,1))
- {
- RemovePlayerAttachedObject(playerid,1);
- }
- if(weaponid[4] && weaponammo[4] > 0)
- {
- if(pArmedWeapon != weaponid[4])
- {
- if(!IsPlayerAttachedObjectSlotUsed(playerid,2))
- {
- SetPlayerAttachedObject(playerid,2,GetWeaponModel(weaponid[4]),7, 0.000000, -0.100000, -0.080000, -95.000000, -10.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,2))
- {
- RemovePlayerAttachedObject(playerid,2);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,2))
- {
- RemovePlayerAttachedObject(playerid,2);
- }
- if(weaponid[5] && weaponammo[5] > 0)
- {
- if(pArmedWeapon != weaponid[5])
- {
- if(!IsPlayerAttachedObjectSlotUsed(playerid,3))
- {
- SetPlayerAttachedObject(playerid,3,GetWeaponModel(weaponid[5]),1, 0.200000, -0.119999, -0.059999, 0.000000, 206.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,3))
- {
- RemovePlayerAttachedObject(playerid,3);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,3))
- {
- RemovePlayerAttachedObject(playerid,3);
- }
- IsAttached[playerid] = GetTickCount();
- }
- if(GetPVarInt(playerid, "laser") == 1)
- {
- RemovePlayerAttachedObject(playerid, 4);
- if((IsPlayerInAnyVehicle(playerid)) || (IsPlayerInWater(playerid))) return 1;
- switch (GetPlayerWeapon(playerid))
- {
- case 23:
- {
- if(IsPlayerAiming(playerid))
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.108249, 0.030232, 0.118051, 1.468254, 350.512573, 364.284240);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.108249, 0.030232, 0.118051, 1.468254, 349.862579, 364.784240);
- }
- }
- else
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.078248, 0.027239, 0.113051, -11.131746, 350.602722, 362.384216);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.078248, 0.027239, 0.113051, -11.131746, 350.602722, 362.384216);
- }
- }
- }
- case 27:
- {
- if(IsPlayerAiming(playerid))
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.588246, -0.022766, 0.138052, -11.531745, 347.712585, 352.784271);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.588246, -0.022766, 0.138052, 1.468254, 350.712585, 352.784271);
- }
- }
- else
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.563249, -0.01976, 0.134051, -11.131746, 351.602722, 351.384216);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.563249, -0.01976, 0.134051, -11.131746, 351.602722, 351.384216);
- }
- }
- }
- case 30:
- {
- if(IsPlayerAiming(playerid))
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.628249, -0.027766, 0.078052, -6.621746, 352.552642, 355.084289);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.628249, -0.027766, 0.078052, -1.621746, 356.202667, 355.084289);
- }
- }
- else
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.663249, -0.02976, 0.080051, -11.131746, 358.302734, 353.384216);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.663249, -0.02976, 0.080051, -11.131746, 358.302734, 353.384216);
- }
- }
- }
- case 31:
- {
- if(IsPlayerAiming(playerid))
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.528249, -0.020266, 0.068052, -6.621746, 352.552642, 355.084289);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.528249, -0.020266, 0.068052, -1.621746, 356.202667, 355.084289);
- }
- }
- else
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.503249, -0.02376, 0.065051, -11.131746, 357.302734, 354.484222);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.503249, -0.02376, 0.065051, -11.131746, 357.302734, 354.484222);
- }
- }
- }
- case 34:
- {
- if(IsPlayerAiming(playerid))
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.528249, -0.020266, 0.068052, -6.621746, 352.552642, 355.084289);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.528249, -0.020266, 0.068052, -1.621746, 356.202667, 355.084289);
- }
- }
- else
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.658248, -0.03276, 0.133051, -11.631746, 355.302673, 353.584259);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.658248, -0.03276, 0.133051, -11.631746, 355.302673, 353.584259);
- }
- }
- }
- case 29:
- {
- if(IsPlayerAiming(playerid))
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.298249, -0.02776, 0.158052, -11.631746, 359.302673, 357.584259);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.298249, -0.02776, 0.158052, 8.368253, 358.302673, 352.584259);
- }
- }
- else
- {
- if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.293249, -0.027759, 0.195051, -12.131746, 354.302734, 352.484222);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, GetPVarInt(playerid, "color"), 6, 0.293249, -0.027759, 0.195051, -12.131746, 354.302734, 352.484222);
- }
- }
- }
- }
- }
- new COPSKills_String[64] = "COPS : %i";
- new TerroristsKills_String[64] = "Terrorist : %i";
- if(COPSKills_Var >= 100)
- {
- COPSKills_Var = 0;
- TerroristsKills_Var = 0;
- SendClientMessageToAll(COLOR_LIME, "[ROUND] Team COPS Won's this round, all Player of Team COPS get 10Scores, 100$ And 5Cookies, Congratz Team COPS.");
- GiveScoreToTeam(TEAM_COPS, 10);
- GiveCashToTeam(TEAM_COPS, 100);
- GiveCookieToTeam(TEAM_COPS, 5);
- }
- if(TerroristsKills_Var >= 100)
- {
- COPSKills_Var = 0;
- TerroristsKills_Var = 0;
- SendClientMessageToAll(COLOR_LIME, "[ROUND] Team Terrorist Won's this round, all Player of Team Terrorist get 10Scores, 100$ And 5Cookies, Congratz Team Terrorist.");
- GiveScoreToTeam(TEAM_TERRORIST, 10);
- GiveCashToTeam(TEAM_TERRORIST, 100);
- GiveCookieToTeam(TEAM_TERRORIST, 5);
- }
- format(COPSKills_String, sizeof(COPSKills_String), COPSKills_String, COPSKills_Var);
- TextDrawSetString(COPSKills, COPSKills_String);
- format(TerroristsKills_String, sizeof(TerroristsKills_String), TerroristsKills_String, TerroristsKills_Var);
- TextDrawSetString(TerroristsKills, TerroristsKills_String);
- TextDrawShowForAll(COPSKills);
- TextDrawShowForAll(TerroristsKills);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment