Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: mayk poslato Oktobar 18, 2011, 15:11:12 POSLE PODNE

Naslov: [POMOC]Invite
Poruka od: mayk poslato Oktobar 18, 2011, 15:11:12 POSLE PODNE
Skripta koju koristim:BU
Detaljan opis problema:sam zedao neki cmd od LSSRPG i koga /invite nekid pishe toj clen e vo neki org/banda/mafija ok to sam sredio sega problemot e sto koga neki /invite pravo ulegni u org/banda/mafija a dodao sam /accept invite, moze ubav kod so /invite koga se invite da prifati igracot so /accept invite ewo kodove
Dio skripte:

//----------------------------------[INVITE]------------------------------------------------
if(strcmp(cmd, "/invite", true) == 0)
{
   if(IsPlayerConnected(playerid))
   {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /invite [playerid/PartOfName]");
return 1;
}
new ftext[20];
giveplayerid = ReturnUser(tmp);
if(PlayerInfo[playerid][pLeader] >= 1)
{
   if(IsPlayerConnected(giveplayerid))
   {
       if(giveplayerid != INVALID_PLAYER_ID)
       {
   {
       GetPlayerName(playerid, sendername, sizeof(sendername));
       GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
       if(PlayerInfo[playerid][pLeader] == 1) { ftext = "Police Force"; }
       else if(PlayerInfo[playerid][pLeader] == 2) { ftext = "FBI"; }
       else if(PlayerInfo[playerid][pLeader] == 3) { ftext = "SAST"; }
       else if(PlayerInfo[playerid][pLeader] == 4) { ftext = "Firemen/Ambulance"; }
       else if(PlayerInfo[playerid][pLeader] == 5) { ftext = "National Guards"; }
       else if(PlayerInfo[playerid][pLeader] == 6) { ftext = "Senate"; }
       else if(PlayerInfo[playerid][pLeader] == 7) { ftext = "CIA"; }
       else if(PlayerInfo[playerid][pLeader] == 8) { ftext = "Hitman Agency"; }
       else if(PlayerInfo[playerid][pLeader] == 9) { ftext = "News Agency"; }
       else if(PlayerInfo[playerid][pLeader] == 10) { ftext = "Taxi Cab Company"; }
       format(string, sizeof(string), "* You have Invited %s to join the %s.", giveplayer, ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has invited you to join the %s, (type /accept faction) to accept.",sendername, ftext);
       SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
FactionOffer[giveplayerid] = playerid;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command (leaders only) !");
}
}
return 1;
}


else if(strcmp(x_job,"invite",true) == 0)
{
   if(FactionOffer[playerid] < 999)
   {
       if(IsPlayerConnected(FactionOffer[playerid]))
       {
           if(PlayerInfo[FactionOffer[playerid]][pLeader] != 0)
           {
               if(PlayerInfo[playerid][pMember] != 0 || PlayerInfo[playerid][pLeader] != 0 || PlayerInfo[playerid][pFMember] != 255)
               {
                   SendClientMessage(playerid, COLOR_GREY, "   You are already in a Faction / Family !");
       return 1;
               }
new ftext[20];
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(FactionOffer[playerid], giveplayer, sizeof(giveplayer));
new faction = PlayerInfo[FactionOffer[playerid]][pLeader];
if(faction == 1) { ftext = "Police Force"; ChosenSkin[playerid] = 141; }
       else if(faction == 2) { ftext = "FBI"; ChosenSkin[playerid] = 286; }
       else if(faction == 3) { ftext = "SAST"; ChosenSkin[playerid] = 34; }
       else if(faction == 4) { ftext = "Firemen/Ambulance"; ChosenSkin[playerid] = 279;}
       else if(faction == 5) { ftext = "National Guards"; ChosenSkin[playerid] = 287; }
       else if(faction == 6) { ftext = "Senate"; ChosenSkin[playerid] = 147; }
       else if(faction == 7) { ftext = "CIA"; ChosenSkin[playerid] = 294; }
       else if(faction == 8) { ftext = "Hitman Agency"; ChosenSkin[playerid] = 294; }
       else if(faction == 9) { ftext = "News Agency"; ChosenSkin[playerid] = 150; }
       else if(faction == 10) { ftext = "Taxi Cab Company"; ChosenSkin[playerid] = 61; }
format(string, sizeof(string), "* You have accepted %s's request to join the %s, you are now a Member of it.", giveplayer, ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has accepted your request and is now a Member of the %s.", sendername, ftext);
SendClientMessage(FactionOffer[playerid], COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_LIGHTRED, "* Use 'next' to Select the char you want to use.");
SendClientMessage(playerid, COLOR_LIGHTRED, "* If you've found the Char you want to use, type 'done'.");
PlayerInfo[playerid][pMember] = PlayerInfo[FactionOffer[playerid]][pLeader];
PlayerInfo[playerid][pRank] = 0;
new rand = random(sizeof(gInviteSpawns));
SetPlayerPos(playerid, gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
SetPlayerFacingAngle(playerid, gInviteSpawns[rand][3]);
SetPlayerCameraPos(playerid,gInviteSpawns[rand][0] + 3, gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
SetPlayerCameraLookAt(playerid,gInviteSpawns[rand][0], gInviteSpawns[rand][1], gInviteSpawns[rand][2]);
TogglePlayerControllable(playerid, 0);
SetPlayerInterior(playerid, 0);
SelectChar[playerid] = 255;
SelectCharPlace[playerid] = 1;
SelectCharID[playerid] = faction;
SetPlayerSkin(playerid, ChosenSkin[playerid]);
PlayerInfo[playerid][pModel] = ChosenSkin[playerid];
FactionOffer[playerid] = 999;
SetPlayerSpawn(playerid);
return 1;
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "   The Player who invited you is no longer a Faction Leader !");
    return 1;
}
       }
}
else
{
   SendClientMessage(playerid, COLOR_GREY, "   Nobody sent you a Faction Invite !");
   return 1;
}
}


Neke slike/video za lakse dobivanje pomoci(neobavezno)://
Naslov: Odg: [POMOC]Invite
Poruka od: dragan12 poslato Oktobar 18, 2011, 20:49:15 POSLE PODNE
//----------------------------------[INVITE]------------------------------------------------
if(strcmp(cmd, "/invite", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /invite [playerid/PartOfName]");
return 1;
}
new ftext[20];
giveplayerid = ReturnUser(tmp);
if(PlayerInfo[playerid][pLeader] >= 1)
{
    if(IsPlayerConnected(giveplayerid))
    {
        if(giveplayerid != INVALID_PLAYER_ID)
        {
    {
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
        if(PlayerInfo[playerid][pLeader] == 1) { ftext = "Police Force"; }
        else if(PlayerInfo[playerid][pLeader] == 2) { ftext = "FBI"; }
        else if(PlayerInfo[playerid][pLeader] == 3) { ftext = "SAST"; }
        else if(PlayerInfo[playerid][pLeader] == 4) { ftext = "Firemen/Ambulance"; }
        else if(PlayerInfo[playerid][pLeader] == 5) { ftext = "National Guards"; }
        else if(PlayerInfo[playerid][pLeader] == 6) { ftext = "Senate"; }
        else if(PlayerInfo[playerid][pLeader] == 7) { ftext = "CIA"; }
        else if(PlayerInfo[playerid][pLeader] == 8) { ftext = "Hitman Agency"; }
        else if(PlayerInfo[playerid][pLeader] == 9) { ftext = "News Agency"; }
        else if(PlayerInfo[playerid][pLeader] == 10) { ftext = "Taxi Cab Company"; }
        format(string, sizeof(string), "* You have Invited %s to join the %s.", giveplayer, ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s has invited you to join the %s, (type /accept faction) to accept.",sendername, ftext);
        SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
FactionOffer[giveplayerid] = playerid;
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   You are not authorized to use that command (leaders only) !");
}
}
return 1;
}

Ti kolko sam skontao kazes da kada kucas /invite da odmah on stavi igraca u org. U ovoj komandi to nema kolko ja vidim.
Naslov: Odg: [POMOC]Invite
Poruka od: Bvana Iz Lagune poslato Oktobar 18, 2011, 21:12:03 POSLE PODNE
Ne nego zeli da  poveze /invite i /accept  invite
Kad mu lider kuca /invite 0
i onda ID 0 kuca /accept invite  i prihvati poziv  u org. :)
Ja mislim da to on hoce.
Naslov: Odg: [POMOC]Invite
Poruka od: dragan12 poslato Oktobar 18, 2011, 21:18:29 POSLE PODNE
Citat: Lozim se na FyoDoR-a :P poslato Oktobar 18, 2011, 21:12:03 POSLE PODNE
Ne nego zeli da  poveze /invite i /accept  invite
Kad mu lider kuca /invite 0
i onda ID 0 kuca /accept invite  i prihvati poziv  u org. :)
Ja mislim da to on hoce.
Njemu je to vec povezano kolko vidim. Ali ona kaze da mu to neradi. I da on odmah ubaci igraca u org.
Ako nadjes u /invite PlayerInfo[giveplayerid][pMember] da stavlja na org svaka cast
Naslov: Odg: [POMOC]Invite
Poruka od: mayk poslato Oktobar 19, 2011, 17:31:28 POSLE PODNE
abe gagi ja koga /invite 0 se primam bez da kucim /accept invite, neradi ako sakas probaj
Naslov: Odg: [POMOC]Invite
Poruka od: dragan12 poslato Oktobar 19, 2011, 17:43:25 POSLE PODNE
if(strcmp(cmd, "/invite", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /invite [ID Igraca/Dio Imena]");
return 1;
}
new para1;
new ftext[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
    if(IsPlayerConnected(para1))
    {
        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 = "LS-PD"; ChosenSkin[para1] = 71; SetPlayerSkin(para1, 71);  }
        else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "BIA Agent"; ChosenSkin[para1] = 286; SetPlayerSkin(para1, 286);  }
        else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "P.T.O"; ChosenSkin[para1] = 287; SetPlayerSkin(para1, 287); }
        else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "Hitna Pomoc"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
        else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 111; SetPlayerSkin(para1, 111); }
        else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 6; gTeam[para1] = 6; ftext = "Groove Street"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
        else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
        else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Ballas"; ChosenSkin[para1] = 249; SetPlayerSkin(para1, 249); }
        else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "RB"; ChosenSkin[para1] = 148; SetPlayerSkin(para1, 148); }
        //else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "SF PD"; ChosenSkin[para1] = 71; SetPlayerSkin(para1, 71); }
        else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 121; gTeam[para1] = 121; ftext = "The Escobar Cartel"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
        //else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 13; gTeam[para1] = 13; ftext = "Triads"; ChosenSkin[para1] = 125; SetPlayerSkin(para1, 125); }
        else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yamaguchi"; ChosenSkin[para1] = 169; SetPlayerSkin(para1, 169); }
        else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "47th Familija"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }
        else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 16; ftext = "Coper Club"; ChosenSkin[para1] = 247; SetPlayerSkin(para1, 247); }
        //else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[para1][pTeam] = 17; gTeam[para1] = 17; ftext = "CIA"; ChosenSkin[para1] = 188; SetPlayerSkin(para1, 188); }
        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), "   Pozvani ste u %s, pozvao vas je Lider %s", ftext, sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), "   Pozvali ste %s-a da se pridruzi %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_WHITE, string);
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "  Taj igrac ima wanted level/ u drugom je timu/ ili je vec clan neke organizacije.");
    return 1;
}
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, "   Niste ovlasteni da koristite tu komadnu(samo lideri!!)!");
}
}
return 1;
}

To je komanda iz BU moda e tu vec pozove i ubaci igraca u org. A koju ti to poruku ispise kada ga ubaci odmah aj mi daj nju kada nekoga invite da vidim sta pise.
Naslov: Odg: [POMOC]Invite
Poruka od: mayk poslato Oktobar 19, 2011, 18:47:37 POSLE PODNE
ABE JAS VI REKOV STO E PROBLEMO JAS SI RADIM STO TE ZANIMAVA TO TEBE ??!!? AKO ZNAS POMOGNI AKO NE NEMORA
Naslov: Odg: [POMOC]Invite
Poruka od: Chuck:) poslato Oktobar 19, 2011, 20:45:41 POSLE PODNE
Citat: mayk poslato Oktobar 19, 2011, 18:47:37 POSLE PODNE
ABE JAS VI REKOV STO E PROBLEMO JAS SI RADIM STO TE ZANIMAVA TO TEBE ??!!? AKO ZNAS POMOGNI AKO NE NEMORA

Ne moraš se derat (Capsat), nema potrebe.
Ujedno je capsanje zabranjeno na internetu.
Ja se ispričavam, ne razumijemo te, ne moraš tako burno reagirati.
Budi tolerantan, mi ti pokušavamo pomoći, a ti capsaš.