[Pomoc] Tazer komanda.

Započeo EdisB
1. Mar. 2014. Zaključano
323
pregleda
5
postova
EdisB
3
Wheel Man
1. Mar. 2014.
Skripta koju koristim:Geforce koju naknadno editujem.
Detaljan opis problema:Zelim da napravim OPSP tazer onaj, ali svaki put kada sve lijepo complieam, prodje odlicno sve, udjem u igru, kucam /tazer ono ne radi. Isto kao da nisam ni kucao.
Dio skripte:
 if(strcmp(cmd, "/tazer", true) ==0 || strcmp(cmd, "/ta", true) ==0)
{
// We make it again for TEAM_COPS
    if(gTeam == 2) // For cops
    {
        if(IsPlayerInAnyVehicle(playerid)) // Checks if the player is in a vehicle.
        {
            SendClientMessage(playerid, 0xFF0000FF, "You can't use this command while in a car!");
            return 1;
        }
        if(pTazer == 0) // If the player has no tazer withdrawn.
        {
            GivePlayerWeapon(playerid, 23, 20); // Gives a SD.
            pTazer = 1; // Sets the var to true.
            return 1;
        }
        else if(pTazer == 1) // If the player has the tazer withdrawn to holster it.
        {
            GivePlayerWeapon(playerid, 24, 100); // Gives a deagle.
            pTazer = 0; // Sets the var to false.
            return 1;
        }
    }// Not a cop.
    return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):

Sve sam lijepo dodao, i varijable, i OPSP callback u skripti, ali ne radi..
Nitro
5
Godfather
1. Mar. 2014.
Ocito da ne koristis strcmp procesor komandi,stavi komandu na kraj skripte.
EdisB
3
Wheel Man
3. Mar. 2014.
Koristim, koristim..
Kako mislis da stavim na kraj? Sve ovo isto samo na kraj gamemoda?
Andrijan
4
Shot Caller
3. Mar. 2014.
if(strcmp(cmd, "/tazer", true) ==0 || strcmp(cmd, "/ta", true) ==0)
{
    if(IsACop(playerid) && PlayerInfo == 1)
    {
        new weapons;
for (new i = 0; i < 13; i++)
{
    GetPlayerWeaponData(playerid, i, weapons, weapons);
}

if(Tazer == 0)
{
if(PlayerInfo != 0)
{
    new ammo = weapons;
PreTazerAmmo = ammo;
SafeGivePlayerWeapon(playerid, 23, PlayerInfo);
Tazer = 1;
AttachWeaponCorrectly(playerid, 24);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 500);
    OnePlayAnim(playerid,"SWORD","sword_block",50.0,0,1,1,1,1);
format(string, sizeof(string), "* %s hostlers his Desert Deagle and Unhostlers his Tazer.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
}
else
{
    SendClientMessage(playerid, COLOR_GREY,"* No charges in the tazer!");
    return 1;
}
}
else
{
new ammo = weapons;
PlayerInfo = ammo;
SafeGivePlayerWeapon(playerid, 24, PreTazerAmmo);
AttachWeaponCorrectly(playerid, 23);
Tazer = 0;
ClearAnimations(playerid);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, PlayerInfo);
format(string, sizeof(string), "* %s hostlers his tazer and Unhostlers his Deagle.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
}
}
    return 1;
}

Evoo izvoli 🙂
EdisB
3
Wheel Man
3. Mar. 2014.
Hvala ti, ali nema svako iste varijable tako da meni ova CMD ne radi sto si mi poslao.

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha