Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: Scrilax poslato Avgust 06, 2016, 22:02:35 POSLE PODNE

Naslov: [Pomoc]/invite
Poruka od: Scrilax poslato Avgust 06, 2016, 22:02:35 POSLE PODNE
Skripta koju koristim:Balkan Victory
Detaljan opis problema:Kada probam /invite nekog igraca ispise [ODBIJENO]Taj igrac ima wanted level ili je u drugoj organizaciji.
Dio skripte:

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(strcmp(cmd, "/invite", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /invite [ID Igraca/Deo Imena]");
return 1;
}
new para1;
new ftext[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
    if(IsPlayerConnected(para1))
    {
    if(PlayerInfo[para1][pKazna] == 1) return SCM(playerid,COLOR_WHITE,"Igrac ima Lidersku kaznu");
                  if(PlayerInfo[para1][pKazna] == 2) return SCM(playerid,COLOR_WHITE,"Igrac ima Adminsku kaznu");
if(PlayerInfo[para1][pLevel] < 2)
{
SendClientMessage(playerid, COLOR_GREY, "[GRESKA] Igrac mora biti minimum level 2! ");
return 1;
}
if(para1 != INVALID_PLAYER_ID)
        {
    if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
    {
        if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policija"; ChosenSkin[para1] = 265; SetPlayerSkin(para1, 265); }
        else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Zandarmerija"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
        else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Vojska"; ChosenSkin[para1] = 164; SetPlayerSkin(para1, 164); }// NOVA ORG
        else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Hitna Pomoc"; ChosenSkin[para1] = 274; SetPlayerSkin(para1, 274); }
        else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "The Russian Mafia"; ChosenSkin[para1] = 126; SetPlayerSkin(para1, 126); }
        else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 98; SetPlayerSkin(para1, 98); }
else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Vlada"; ChosenSkin[para1] = 61; SetPlayerSkin(para1, 61); }
                            else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 8; gTeam[para1] = 8; ftext = "Fast & Furious"; ChosenSkin[para1] = 117; SetPlayerSkin(para1, 117); }// NOVA ORG
        else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "[BG] Novinari"; ChosenSkin[para1] = 17; SetPlayerSkin(para1, 17); }
        else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Company"; ChosenSkin[para1] = 182; SetPlayerSkin(para1, 182); }
        else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 11; gTeam[para1] = 2; ftext = "Yamaguchi"; ChosenSkin[para1] = 23; SetPlayerSkin(para1, 23); }// NOVA ORG
else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Parking Servis"; ChosenSkin[para1] = 16; SetPlayerSkin(para1, 16); }
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 12; ftext = "Columbian Cartel"; ChosenSkin[para1] = 103; SetPlayerSkin(para1, 103); }
else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Street Boys"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }// NOVA ORG
        else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Silent Assasins"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }
        else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 16; ftext = "Crips"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
        else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "PO 1"; ChosenSkin[para1] = 111; SetPlayerSkin(para1, 111); }
        else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "Bajkeri"; ChosenSkin[para1] = 247; SetPlayerSkin(para1, 247); }
        else if(PlayerInfo[playerid][pLeader] == 19) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "PO 2"; ChosenSkin[para1] = 247; SetPlayerSkin(para1, 247); }
                            else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
printf("AdmCmd: %s je pozvao %s-a da se pridruzi %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), "[INFO] {FFFFFF}Pozvani ste u %s, pozvao vas je Lider %s", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "[INFO] {FFFFFF}Pozvali ste %s-a da se pridruzi %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "[ODBIJENO] Taj igrac ima wanted level ili je u drugoj organizaciji.");
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "[GRESKA] Samo Lideri mogu koristiti ovu komandu!");
}
}
return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Naslov: Odg: [Pomoc]/invite
Poruka od: VuKaN poslato Avgust 07, 2016, 02:17:44 PRE PODNE
Šta ti ovo "pFMember" označava? Proveri da li ti po defultu stavlja pFMember na 255
Naslov: Odg: [Pomoc]/invite
Poruka od: Scrilax poslato Avgust 07, 2016, 10:29:06 PRE PODNE
Po default mi je pFMember 255
Naslov: Odg: [Pomoc]/invite
Poruka od: ▂ ▃ ▅ Rudimental ▅ ▃ ▂ poslato Avgust 07, 2016, 12:01:26 POSLE PODNE
Uopste ovde nemas nikakve provere za to sto kazes da je odbijeno. Da nemas ti jos negde istu komandu tipa u nekoj fs ili tako nesto ?
Naslov: Odg: [Pomoc]/invite
Poruka od: Scrilax poslato Avgust 07, 2016, 12:18:12 POSLE PODNE
Nemam,do skoro mi je radilo ali se sad nesto zeznulo pa ako moze pomoc
Naslov: Odg: [Pomoc]/invite
Poruka od: Scrilax poslato Avgust 07, 2016, 12:19:10 POSLE PODNE
Mozda nema provera samo poruka a nisam bas neki skripter pa da sredim sam
Naslov: Odg: [Pomoc]/invite
Poruka od: Seiz poslato Avgust 07, 2016, 13:01:44 POSLE PODNE
Zameni tvoju komandu sa:
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(strcmp(cmd, "/invite", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /invite [ID Igraca/Deo Imena]");
return 1;
}
new para1;
new ftext[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
    if(IsPlayerConnected(para1))
    {
    if(PlayerInfo[para1][pKazna] == 1) return SCM(playerid,COLOR_WHITE,"Igrac ima Lidersku kaznu");
                  if(PlayerInfo[para1][pKazna] == 2) return SCM(playerid,COLOR_WHITE,"Igrac ima Adminsku kaznu");
if(PlayerInfo[para1][pLevel] < 2)
{
SendClientMessage(playerid, COLOR_GREY, "[GRESKA] Igrac mora biti minimum level 2! ");
return 1;
}
if(para1 != INVALID_PLAYER_ID)
        {
    if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
    {
        if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Policija"; ChosenSkin[para1] = 265; SetPlayerSkin(para1, 265); }
        else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Zandarmerija"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286); }
        else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "Vojska"; ChosenSkin[para1] = 164; SetPlayerSkin(para1, 164); }// NOVA ORG
        else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Hitna Pomoc"; ChosenSkin[para1] = 274; SetPlayerSkin(para1, 274); }
        else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "The Russian Mafia"; ChosenSkin[para1] = 126; SetPlayerSkin(para1, 126); }
        else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 98; SetPlayerSkin(para1, 98); }
else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "Vlada"; ChosenSkin[para1] = 61; SetPlayerSkin(para1, 61); }
                            else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 8; gTeam[para1] = 8; ftext = "Fast & Furious"; ChosenSkin[para1] = 117; SetPlayerSkin(para1, 117); }// NOVA ORG
        else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "[BG] Novinari"; ChosenSkin[para1] = 17; SetPlayerSkin(para1, 17); }
        else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi Company"; ChosenSkin[para1] = 182; SetPlayerSkin(para1, 182); }
        else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 11; gTeam[para1] = 2; ftext = "Yamaguchi"; ChosenSkin[para1] = 23; SetPlayerSkin(para1, 23); }// NOVA ORG
else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Parking Servis"; ChosenSkin[para1] = 16; SetPlayerSkin(para1, 16); }
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 12; ftext = "Columbian Cartel"; ChosenSkin[para1] = 103; SetPlayerSkin(para1, 103); }
else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Street Boys"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }// NOVA ORG
        else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "Silent Assasins"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }
        else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 16; ftext = "Crips"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
        else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "PO 1"; ChosenSkin[para1] = 111; SetPlayerSkin(para1, 111); }
        else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[para1][pTeam] = 18; gTeam[para1] = 18; ftext = "Bajkeri"; ChosenSkin[para1] = 247; SetPlayerSkin(para1, 247); }
        else if(PlayerInfo[playerid][pLeader] == 19) { PlayerInfo[para1][pTeam] = 19; gTeam[para1] = 19; ftext = "PO 2"; ChosenSkin[para1] = 247; SetPlayerSkin(para1, 247); }
                            else { return 1; }
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
printf("AdmCmd: %s je pozvao %s-a da se pridruzi %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), "[INFO] {FFFFFF}Pozvani ste u %s, pozvao vas je Lider %s", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "[INFO] {FFFFFF}Pozvali ste %s-a da se pridruzi %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
return 1;
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "[ODBIJENO] Taj igrac ima wanted level ili je u drugoj organizaciji.");
return 1;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "[GRESKA] Samo Lideri mogu koristiti ovu komandu!");
}
}
return 1;
}
Naslov: Odg: [Pomoc]/invite
Poruka od: Scrilax poslato Avgust 07, 2016, 13:39:48 POSLE PODNE
Nece,opet isto
Naslov: Odg: [Pomoc]/invite
Poruka od: Seiz poslato Avgust 07, 2016, 14:40:06 POSLE PODNE
To ti je ova linija:
if (gTeam[para1]==TEAM_GREEN && PlayerInfo[para1][pMember] == 0 && PlayerInfo[para1][pFMember] == 255)
ako je bilo sta suprotno od ovoga izbacuje ti tu poruku pa ti proveri da sluceno nemas postavljeno nesto od ovoga.
Naslov: Odg: [Pomoc]/invite
Poruka od: Scrilax poslato Avgust 07, 2016, 14:45:23 POSLE PODNE
U komandi /invite je ova linija sto si mi ti napisao.Poslacu ti u pp sve gde ima pFMember pa ako nesto ne valja ispravi pa mi posalji
Naslov: Odg: [Pomoc]/invite
Poruka od: ▂ ▃ ▅ Rudimental ▅ ▃ ▂ poslato Avgust 07, 2016, 20:54:47 POSLE PODNE

(http://i.imgur.com/8NcveCL.png)

Molimo te da procitas pravila foruma te da onda otvoris temu po pravilima.

Razlog zakljucavanja:

Zabranjen je popularni BUMP(osvježavanje teme duplim postom) osim u slučaju da je prošlo 24h od zadnjeg posta!

Pravila:

Glavna pravila Balkan SA:MP foruma (http://balkan-samp.com/forum/index.php?topic=100332.msg640677#msg640677) .

Razgovor u vezi PAWN-Skriptanja (http://balkan-samp.com/forum/index.php?topic=11453.0) .