Jump to content
  • 0

Comanda /cuff nu merge GM Burned.


Question

Posted

De ce nu merge? Scriu /cuff si scrie /cuff player id pun player id si nu se intampla nimic, cu un flterscript merge dar e tare urat.

Ce sa fac?

YCMD:cuff(playerid, params[], help) {
    if(!IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu esti politist.");
    new id,string[180];
    if(sscanf(params, "u",id)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/cuff <playerid/name>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(IsACop(id)) return 1;
    if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece nu esti la datorie!");
    if(PlayerCuffed2[id] > 0) return 1;
    if(!ProxDetectorS(8.0, playerid, id)) return SCM(playerid, -1, "Acel player nu este langa tine.");
    if(id == playerid) return SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda asupra ta!");
    if(!IsPlayerInAnyVehicle(id)) return 1;
    TogglePlayerControllable(id, 0);
    format(string, sizeof(string), "* %s has handcuffed %s.", GetName(playerid),GetName(id));
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    PlayerCuffed2[id] = 1;
    SetPlayerAttachedObject(id, 1, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
    SetPlayerSpecialAction(id,SPECIAL_ACTION_CUFFED);
    return 1;
}

Recommended Posts

  • 0
Posted
Acum 1 oră, .maSTER a spus:

De ce nu merge? Scriu /cuff si scrie /cuff player id pun player id si nu se intampla nimic, cu un flterscript merge dar e tare urat.

Ce sa fac?

YCMD:cuff(playerid, params[], help) {
    if(!IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu esti politist.");
    new id,string[180];
    if(sscanf(params, "u",id)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/cuff <playerid/name>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(IsACop(id)) return 1;
    if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece nu esti la datorie!");
    if(PlayerCuffed2[id] > 0) return 1;
    if(!ProxDetectorS(8.0, playerid, id)) return SCM(playerid, -1, "Acel player nu este langa tine.");
    if(id == playerid) return SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda asupra ta!");
    if(!IsPlayerInAnyVehicle(id)) return 1;
    TogglePlayerControllable(id, 0);
    format(string, sizeof(string), "* %s has handcuffed %s.", GetName(playerid),GetName(id));
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    PlayerCuffed2[id] = 1;
    SetPlayerAttachedObject(id, 1, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
    SetPlayerSpecialAction(id,SPECIAL_ACTION_CUFFED);
    return 1;
}

Cand dai cuff jucatorul e ON_Foot sau pasager intr o masina?

  • 0
Posted
Chiar acum, valivaly96 a spus:

Cand dai cuff jucatorul e ON_Foot sau pasager intr o masina?

ON foot. Haide pe server sa vezi poate nu stiu eu sa dau. RPG.H*L.RO scuze de reclama in loc de * e G.

  • 0
Posted
Acum 3 minute, .maSTER a spus:

ON foot. Haide pe server sa vezi poate nu stiu eu sa dau. RPG.H*L.RO scuze de reclama in loc de * e G.

 if(!IsPlayerInAnyVehicle(id)) return 1;

asta verifica daca jucatorul nu e in masina sa returneze 1 si sa nu se execute comanda. Pune jucatorul caruia vrei sa ii dai cuff in masina si o sa mearga( cred)

  • 0
Posted (edited)
Acum 1 minut, valivaly96 a spus:

 if(!IsPlayerInAnyVehicle(id)) return 1;

asta verifica daca jucatorul nu e in masina sa returneze 1 si sa nu se execute comanda. Pune jucatorul caruia vrei sa ii dai cuff in masina si o sa mearga( cred)

Pai si daca nu vrea sa urce inauntru ? =))

Eu vreau sa ii dau cuff de afara gen nu din masina.

Edited by .maSTER
  • 0
Posted (edited)
Acum 1 minut, .maSTER a spus:

Pai si daca nu vrea sa urce inauntru ? =))

Eu vreau sa ii dau cuff de afara gen nu din masina.

Stergi acea verificare si ii dai cuff oriunde e

Edited by valivaly96
  • 0
Posted
Chiar acum, valivaly96 a spus:

Stergi acea verificare si ii dai cuff oriunde e

Ok, o sa incerc acum astept sa se compileze. Ma ajuti te rog cu un filterscripts de garaj dar sa fie ok ? Am unul si dau /park si nu mi le arata si ma arunca in void ( sub mapa ). Sau un system ceva sa aiba toate garaj sa se poata deschide si cum sa-l bag in gm. Si ai in privat in maxim 1 ora key Steam.

  • 0
Posted
Acum 2 minute, .maSTER a spus:

Ok, o sa incerc acum astept sa se compileze. Ma ajuti te rog cu un filterscripts de garaj dar sa fie ok ? Am unul si dau /park si nu mi le arata si ma arunca in void ( sub mapa ). Sau un system ceva sa aiba toate garaj sa se poata deschide si cum sa-l bag in gm. Si ai in privat in maxim 1 ora key Steam.

Nu ma intereseaza acel key random. Daca vrei sa imveti nu cere sisteme hata facute. Uitate peste altele inceqrca sa intelegi ce se intampla acolo ce fac acele linii de cod imcearca sa faci tu ca altfel cunostintele vor tinte tot catre zero

  • 0
Posted (edited)
Acum 2 minute, valivaly96 a spus:

Nu ma intereseaza acel key random. Daca vrei sa imveti nu cere sisteme hata facute. Uitate peste altele inceqrca sa intelegi ce se intampla acolo ce fac acele linii de cod imcearca sa faci tu ca altfel cunostintele vor tinte tot catre zero

Nu merge nicicum /cuff. Intra putin sa vezi.

if(PlayerCuffed2[giveplayerid] == 0) return 1; oare asta e?

Edited by .maSTER
  • 0
Posted

Si la uncuff ma trimite la /a comanda.... cum drq s-o fac..

CMD:uncuff(playerid, params[], help) {
    if(!IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu esti politist.");
    if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece nu esti la datorie!");
    new giveplayerid,string[128];
    if(sscanf(params, "u",giveplayerid)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/uncuff <playerid/name>");
    if(!IsPlayerConnected(giveplayerid) && giveplayerid == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(!ProxDetectorS(8.0, playerid, giveplayerid)) return SCM(playerid, -1, "Acel player nu este langa tine.");
    if(giveplayerid == playerid) return 1;
    if(PlayerCuffed2[giveplayerid] == 0) 
    TogglePlayerControllable(giveplayerid, 1);
    format(string, sizeof(string), "* %s has uncuffed %s.", GetName(playerid),GetName(giveplayerid));
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    format(string, sizeof(string), "* Ai fost descatusat de %s.", GetName(playerid));
    SCM(giveplayerid, COLOR_LIGHTBLUE, string);
    PlayerCuffed2[giveplayerid] = 0;
    SetPlayerSpecialAction(giveplayerid,SPECIAL_ACTION_NONE);
    RemovePlayerAttachedObject(giveplayerid,1);
    return 1;
}

Si cuff - YCMD:cuff(playerid, params[], help) {
    if(!IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu esti politist.");
    new id,string[180];
    if(sscanf(params, "u",id)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/cuff <playerid/name>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");
    if(IsACop(id)) return 1;
    if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece nu esti la datorie!");
    if(PlayerCuffed2[id] > 0) return 1;
    if(!ProxDetectorS(8.0, playerid, id)) return SCM(playerid, -1, "Acel player nu este langa tine.");
    if(id == playerid) return SCM(playerid, COLOR_GREY, "Nu poti folosi aceasta comanda asupra ta!");
    TogglePlayerControllable(id, 0); return 1;
    format(string, sizeof(string), "* %s has handcuffed %s.", GetName(playerid),GetName(id));
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    PlayerCuffed2[id] = 1;
    SetPlayerAttachedObject(id, 1, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977, -81.700035, 0.891999, 1.000000, 1.168000);
    SetPlayerSpecialAction(id,SPECIAL_ACTION_CUFFED);
    return 1;
}

  • 0
Posted (edited)
Acum 23 minute, .maSTER a spus:

Nu merge nicicum /cuff. Intra putin sa vezi.

if(PlayerCuffed2[giveplayerid] == 0) return 1; oare asta e?

Nu vad linia asta in comada /cuff.( (PlayerCuffed2[giveplayerid] == 0) return 1;)La ResetVariables cum e PlayerCuffed2[playerid]?

Edited by valivaly96
  • 0
Posted
Acum 1 minut, valivaly96 a spus:

Nu vad linia asta in comada /cuff.( (PlayerCuffed2[giveplayerid] == 0) return 1;)La ResetCariables cum e PlayerCuffed2[playerid]?

Adica ? Am iesit de pe PC, unde trb sa caut?

  • 0
Posted
Acum 13 minute, valivaly96 a spus:

La functia ResetVariables

Daca m-ai putea ajuta maine sau cand ai timp cu Tw.... la asta ma refer cu cuff.

  • 0
Posted
Acum 34 minute, .maSTER a spus:

Si ce trebuie sa gasesc acolo?

Valoarea "default" a variabilei PlayerCuffed2

Acum 42 minute, valivaly96 a spus:

Nu vad linia asta in comada /cuff.( (PlayerCuffed2[giveplayerid] == 0) return 1;)La ResetVariables cum e PlayerCuffed2[playerid]?

 

  • 0
Posted
1 oră în urmă, valivaly96 a spus:

 if(!IsPlayerInAnyVehicle(id)) return 1;

asta verifica daca jucatorul nu e in masina sa returneze 1 si sa nu se execute comanda. Pune jucatorul caruia vrei sa ii dai cuff in masina si o sa mearga( cred)

Mersi mult man, pe mine m-a ajutat raspunsul tau ♥ 

* * ROMANIA LIVE TRUCKING * * [NEW 2018] | ADMIN / VIP GRATIS
▬ HostName: Romania Live Trucking [/rules]
▬ Adresă: 188.212.100.182:7777
▬ Mod: Trucking
▬ Limbă: Română
  • 0
Posted (edited)

Problema e ca mie nici nu-mi scrie gen "Nu poti folosi aceasta comanda asupra ta!" dau enter pe mine si nu scrie nik.

Aici ? PutPlayerInJail(id);
        if(PlayerCuffed2[id] == 1) {
            PlayerCuffed2[id] = 0;
            SetPlayerSpecialAction(id,SPECIAL_ACTION_NONE);
            RemovePlayerAttachedObject(id,1);
            TogglePlayerControllable(id, 1);

 

    ResetVariables(playerid); nu gasesc nimic cu cuffed.

Edited by .maSTER

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.