Jump to content
  • 0

Probleme comanda /megaphone


DavidTKD

Question

Care ma puteti ajuta cu aceasta comanda /megaphone imi spune ca nu sunt in vehicului factiuni si defapt sunt. 

 

YCMD:megaphone(playerid, params[], help) {
    new tmpcar = GetPlayerVehicleID(playerid),textmeg[250],string[200];
    if(PlayerInfo[playerid][pMuted] == 1) {
        format(string, sizeof(string), "You can't talk right now! You are muted. (%d seconds)",PlayerInfo[playerid][pMuteTime]);
        SCM(playerid, COLOR_GREY, string);
        return 1;
    }
    if(sscanf(params, "s[250]", textmeg)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/m <text>");
    if(!IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu faci parte din factiunea politiei.");
    if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece nu esti la datorie!");
    if(!Copcar2(tmpcar)) return SCM(playerid, COLOR_GREY, "Nu esti intr-un vehicul de-al factiunii.");
    if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) format(string, sizeof(string), "> Ofiter %s: %s <", GetName(playerid), textmeg);
    else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2) format(string, sizeof(string), "> Agent %s: %s <", GetName(playerid), textmeg);
    else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3) format(string, sizeof(string), "> Soldat %s: %s <", GetName(playerid), textmeg);
    else if(PlayerInfo[playerid][pMember] == 14||PlayerInfo[playerid][pLeader] == 14) format(string, sizeof(string), "> Capitan %s: %s <", GetName(playerid), textmeg);
    ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
    return 1;
}

 

 

function IsACopCar(carid) {
    if(ServerVehicles[carid][vFaction] == 1) return 1;
    return 0;
}

function Copcar2(carid) {
    if(ServerVehicles[carid][vFaction] == 1) return 1;
    if(ServerVehicles[carid][vFaction] == 2) return 1;
    if(ServerVehicles[carid][vFaction] == 3) return 1;
    if(ServerVehicles[carid][vFaction] == 14) return 1;
    return 0;
}

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Presupun ca e gm burned si daca da, daca nu i-ai adaugat o factiune, scoate tot ce are legatura cu factiunea 14 pentru ca nu exista in baza de date...

function Copcar2(carid) {
    if(ServerVehicles[carid][vFaction] == 1) return 1;
    if(ServerVehicles[carid][vFaction] == 2) return 1;
    if(ServerVehicles[carid][vFaction] == 3) return 1;
    return 0;
}
YCMD:megaphone(playerid, params[], help) {
    new tmpcar = GetPlayerVehicleID(playerid),textmeg[250],string[200];
    if(PlayerInfo[playerid][pMuted] == 1) {
        format(string, sizeof(string), "You can't talk right now! You are muted. (%d seconds)",PlayerInfo[playerid][pMuteTime]);
        SCM(playerid, COLOR_GREY, string);
        return 1;
    }
    if(sscanf(params, "s[250]", textmeg)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/m <text>");
    if(!IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu faci parte din factiunea politiei.");
    if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece nu esti la datorie!");
    if(!Copcar2(tmpcar)) return SCM(playerid, COLOR_GREY, "Nu esti intr-un vehicul de-al factiunii.");
    if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) format(string, sizeof(string), "> Ofiter %s: %s <", GetName(playerid), textmeg);
    else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2) format(string, sizeof(string), "> Agent %s: %s <", GetName(playerid), textmeg);
    else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3) format(string, sizeof(string), "> Soldat %s: %s <", GetName(playerid), textmeg);
    ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
    return 1;
}

 

Edited by CTMBeast
Link to comment
Share on other sites

  • 0
On 12/30/2018 at 9:49 AM, DavidTKD said:

Care ma puteti ajuta cu aceasta comanda /megaphone imi spune ca nu sunt in vehicului factiuni si defapt sunt. 

 

YCMD:megaphone(playerid, params[], help) {
    new tmpcar = GetPlayerVehicleID(playerid),textmeg[250],string[200];
    if(PlayerInfo[playerid][pMuted] == 1) {
        format(string, sizeof(string), "You can't talk right now! You are muted. (%d seconds)",PlayerInfo[playerid][pMuteTime]);
        SCM(playerid, COLOR_GREY, string);
        return 1;
    }
    if(sscanf(params, "s[250]", textmeg)) return SCM(playerid, COLOR_GREY, "USAGE: {FFFFFF}/m <text>");
    if(!IsACop(playerid)) return SCM(playerid, COLOR_GREY, "Nu faci parte din factiunea politiei.");
    if(OnDuty[playerid] == 0) return SCM(playerid, COLOR_LGREEN, "Nu poti folosi aceasta comanda deoarece nu esti la datorie!");
    if(!Copcar2(tmpcar)) return SCM(playerid, COLOR_GREY, "Nu esti intr-un vehicul de-al factiunii.");
    if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) format(string, sizeof(string), "> Ofiter %s: %s <", GetName(playerid), textmeg);
    else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2) format(string, sizeof(string), "> Agent %s: %s <", GetName(playerid), textmeg);
    else if(PlayerInfo[playerid][pMember] == 3||PlayerInfo[playerid][pLeader] == 3) format(string, sizeof(string), "> Soldat %s: %s <", GetName(playerid), textmeg);
    else if(PlayerInfo[playerid][pMember] == 14||PlayerInfo[playerid][pLeader] == 14) format(string, sizeof(string), "> Capitan %s: %s <", GetName(playerid), textmeg);
    ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
    return 1;
}

 

 

function IsACopCar(carid) {
    if(ServerVehicles[carid][vFaction] == 1) return 1;
    return 0;
}

function Copcar2(carid) {
    if(ServerVehicles[carid][vFaction] == 1) return 1;
    if(ServerVehicles[carid][vFaction] == 2) return 1;
    if(ServerVehicles[carid][vFaction] == 3) return 1;
    if(ServerVehicles[carid][vFaction] == 14) return 1;
    return 0;
}

Functioneaza ce ti-am dat?

Link to comment
Share on other sites

  • 0

wowowow YCMD se mai foloseste cineva de el??

[ Anti Flood Pack ] / Click [ Pugb SA:MP ] Click / [ TD Autorizatie ] Click
[ Created dm zone ] Click / [ Salvare vreme si timp ] Click [ Statistica a serverului ] Click
[ Sistema duel ] Click [ TD Registrare/Autorizatie ] Click [ Sistema kill/killed by ] Click
[ Sistema data si ora Click /  [ GM Anticheat ] Click   /  [ Schimbarea mersului ] Click
[ Save Camera ] Click  [ Sitema Concurs ] Click [ Projector pentru elicopter ] Click /
[ DM Zona ] Click / [ Folosirea textelor lungi ] Click / [Khain RPG] Click  / Antisobeit Click
Link to comment
Share on other sites

  • 0
La 06.01.2019 la 23:11, CTMBeast a spus:

Nush :)) Eu am trecut la PawnCMD

Bine faci ca ai trecut

[ Anti Flood Pack ] / Click [ Pugb SA:MP ] Click / [ TD Autorizatie ] Click
[ Created dm zone ] Click / [ Salvare vreme si timp ] Click [ Statistica a serverului ] Click
[ Sistema duel ] Click [ TD Registrare/Autorizatie ] Click [ Sistema kill/killed by ] Click
[ Sistema data si ora Click /  [ GM Anticheat ] Click   /  [ Schimbarea mersului ] Click
[ Save Camera ] Click  [ Sitema Concurs ] Click [ Projector pentru elicopter ] Click /
[ DM Zona ] Click / [ Folosirea textelor lungi ] Click / [Khain RPG] Click  / Antisobeit Click
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.