[POMOC] Joinorg

Započeo Danisha, Novembar 22, 2012, 18:37:57 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:ravens
Detaljan opis problema:E ovako ko zna da mi napravi komandu /joinorg i da neko kuca /joinorg i id lidera ili ime lidera i posalje njemu zahtjev u org i on ako hoce njega primi preko /invite a ako kuca /invite a igrac mu nije poslo /joinorg onda da ga nemoze primi kako to da uradim nisam nikako mogao eo dacu dole komandu /invite
Dio skripte:
CMD:invite(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
new string[128], sendername[MAX_PLAYER_NAME],giveplayerid,giveplayer[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
if(sscanf(params,"u",giveplayerid)) return SCM(playerid, COLOR_GRAD2, "Koriscenje: /invite [playerID/DeoImena]");
new ftext[32];
if(PlayerInfo[playerid][pLeader] >= 1)
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(gTeam[giveplayerid]==TEAM_GREEN && PlayerInfo[giveplayerid][pMember] == 0 && PlayerInfo[giveplayerid][pFMember] == 255)
{
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[giveplayerid][pTeam] = 2; gTeam[giveplayerid] = 2; ftext = "Policija"; ChosenSkin[giveplayerid] = 71; SetPlayerSkin(giveplayerid, 71); }
else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[giveplayerid][pTeam] = 2; gTeam[giveplayerid] = 2; ftext = "FBI/ATF"; ChosenSkin[giveplayerid] = 286; SetPlayerSkin(giveplayerid, 286); }
else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[giveplayerid][pTeam] = 2; gTeam[giveplayerid] = 2; ftext = "JSO"; ChosenSkin[giveplayerid] = 287; SetPlayerSkin(giveplayerid, 287); }
else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[giveplayerid][pTeam] = 1; gTeam[giveplayerid] = 1; ftext = "Ambulanta"; ChosenSkin[giveplayerid] = 70; SetPlayerSkin(giveplayerid, 70); }
else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[giveplayerid][pTeam] = 1; gTeam[giveplayerid] = 1; ftext = "Vatrogasci"; ChosenSkin[giveplayerid] = 70; SetPlayerSkin(giveplayerid, 70); }
else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[giveplayerid][pTeam] = 5; gTeam[giveplayerid] = 5; ftext = "Varrios Los Aztecas"; ChosenSkin[giveplayerid] = 116; SetPlayerSkin(giveplayerid, 116); }
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[giveplayerid][pTeam] = 5; gTeam[giveplayerid] = 5; ftext = "Sons of Anarchy"; ChosenSkin[giveplayerid] = 248; SetPlayerSkin(giveplayerid, 248); }
else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[giveplayerid][pTeam] = 6; gTeam[giveplayerid] = 6; ftext = "La Familia Teller"; ChosenSkin[giveplayerid] = 46; SetPlayerSkin(giveplayerid, 46); }
else if(PlayerInfo[playerid][pLeader] == 7) { return 1; }
else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[giveplayerid][pTeam] = 10; gTeam[giveplayerid] = 12; ftext = "Hitman Agency"; ChosenSkin[giveplayerid] = 249; SetPlayerSkin(giveplayerid, 249); }
else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[giveplayerid][pTeam] = 12; gTeam[giveplayerid] = 12; ftext = "RTS"; ChosenSkin[giveplayerid] = 148; SetPlayerSkin(giveplayerid, 148); }
else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[giveplayerid][pTeam] = 12; gTeam[giveplayerid] = 12; ftext = "Taxi Cab Company"; ChosenSkin[giveplayerid] = 255; SetPlayerSkin(giveplayerid, 255); }
else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[giveplayerid][pTeam] = 12; gTeam[giveplayerid] = 12; ftext = "School Instructors"; ChosenSkin[giveplayerid] = 59; SetPlayerSkin(giveplayerid, 59); }
else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[giveplayerid][pTeam] = 5; gTeam[giveplayerid] = 12; ftext = "Yamaguchi"; ChosenSkin[giveplayerid] = 169; SetPlayerSkin(giveplayerid, 169); }
else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[giveplayerid][pTeam] = 15; gTeam[giveplayerid] = 15; ftext = "LCN"; ChosenSkin[giveplayerid] = 258; SetPlayerSkin(giveplayerid, 258); }
else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[giveplayerid][pTeam] = 5; gTeam[giveplayerid] = 12; ftext = "La Vice"; ChosenSkin[giveplayerid] = 143; SetPlayerSkin(giveplayerid, 143); }
else if(PlayerInfo[playerid][pLeader] == 17) { PlayerInfo[giveplayerid][pTeam] = 12; gTeam[giveplayerid] = 12; ftext = "Parking Servis"; ChosenSkin[giveplayerid] = 16; SetPlayerSkin(giveplayerid, 16); }
else if(PlayerInfo[playerid][pLeader] == 18) { PlayerInfo[giveplayerid][pTeam] = 5; gTeam[giveplayerid] = 12; ftext = "Grove Street"; ChosenSkin[giveplayerid] = 106; SetPlayerSkin(giveplayerid, 106); }
else if(PlayerInfo[playerid][pLeader] == 19)
{
PlayerInfo[giveplayerid][pTeam] = 5;
gTeam[giveplayerid] = 12;
ftext = "Yakuza (Priv. Org.)";
if(PlayerInfo[playerid][pSex] == 1)
{
ChosenSkin[giveplayerid] = 59;
SetPlayerSkin(giveplayerid, 59);
}
else if(PlayerInfo[playerid][pSex] == 2)
{
ChosenSkin[giveplayerid] = 12;
SetPlayerSkin(giveplayerid, 12);
}
}
else if(PlayerInfo[playerid][pLeader] == 20) { PlayerInfo[giveplayerid][pTeam] = 5; gTeam[giveplayerid] = 12; ftext = "MS 13 (Priv. Org.)"; ChosenSkin[giveplayerid] = 102; SetPlayerSkin(giveplayerid, 102); }
else if(PlayerInfo[playerid][pLeader] == 21) { PlayerInfo[giveplayerid][pTeam] = 5; gTeam[giveplayerid] = 12; ftext = "Russian Mafia (Priv. Org.)"; ChosenSkin[giveplayerid] = 121; SetPlayerSkin(giveplayerid, 121); }
else if(PlayerInfo[playerid][pLeader] == 23) { PlayerInfo[giveplayerid][pTeam] = 5; gTeam[giveplayerid] = 12; ftext = "Street Racers (Priv. Org.)"; ChosenSkin[giveplayerid] = 206; SetPlayerSkin(giveplayerid, 206); }
else if(PlayerInfo[playerid][pLeader] == 24) { PlayerInfo[giveplayerid][pTeam] = 5; gTeam[giveplayerid] = 12; ftext = "Srpska Mafija (Priv. Org.)"; ChosenSkin[giveplayerid] = 59; SetPlayerSkin(giveplayerid, 59); }
else if(PlayerInfo[playerid][pLeader] == 25) { PlayerInfo[giveplayerid][pTeam] = 5; gTeam[giveplayerid] = 12; ftext = "LCM (Priv. Org.)"; ChosenSkin[giveplayerid] = 240; SetPlayerSkin(giveplayerid, 240); }
else { return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

PlayerInfo[giveplayerid][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[giveplayerid][pRank] = 1;
printf("AdmCmd: %s has invited %s to join %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), "   You have Joined the %s, you were invited by Leader %s", ftext, sendername);
SCM(giveplayerid, COLOR_WHITE, string);
format(string, sizeof(string), "   You have Invited %s to join the %s.", giveplayer,ftext);
SCM(playerid, COLOR_WHITE, string);
new y, m, d;
new h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s je ubacio clana %s u svoju organizaciju (%s).",d,m,y,h,mi,s,sendername,giveplayer,ftext);
UninviteLog(string);
}
else
{
SCM(playerid, COLOR_GREY, "  That player is currently Wanted / a Different Team / or already a Family Member.");
return 1;
}
}
}
else
{
SCM(playerid, COLOR_GRAD1, "   Niste ovlasceni da koristite ovu komandu!(leaders only)!");
}
}
return 1;
}

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

vlado_plavsic

CMD:askforinv(playerid, params[])
{
    new id,string[50];
    if(sscanf(params, "u",id)) return SendClientMessage(playerid, -1, "Koristi: /askforinv [id]");
    else
    {
        if(PlayerInfo[id][pLeader] > 0 && PlayerInfo[playerid][pMember] < 0)
        {
            format(string, sizeof(string),"%s trazi od vas da ga inv u org.",playerid);
            SendClientMessage(id,-1, string);
        }
        else SendClientMessage(playerid, -1, "Ili taj igrac nije lider ili ste vi vec u nekoj org.");
    }
    return 1;
}


Ne kompajliram kod tako da ne garantujem da nema gresaka. POzdrav

Aha druze ali dao sam gore /invite kako sada da prepravim u invite da ga nemoze primit bez te tvoje komande i npr ako lider ne ukuca za 15s /invite da ga nemoze opet primit da pise igrac nije poslao i onda igrac mora ponovo poslat
Poslednja Izmena: Novembar 22, 2012, 20:43:30 POSLE PODNE od Danisha

vlado_plavsic

Citat: Danisha poslato Novembar 22, 2012, 20:42:20 POSLE PODNE
Aha druze ali dao sam gore /invite kako sada da prepravim u invite da ga nemoze primit bez te tvoje komande i npr ako lider ne ukuca za 15s /invite da ga nemoze opet primit da pise igrac nije poslao i onda igrac mora ponovo poslat

Kako to mislis? Objasni detaljnije.