[


Započeo Nitr0, Jul 14, 2014, 21:57:17 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim:BE x8.5
Detaljan opis problema:Kako da napravim da kad lider invite igraca u organizaciju da igrac mora kucati /prihvati poziv i da se pridruzi toj ogranizaciji a ako ne zeli da se pridruzi da kuca /odbij poziv.
Dio skripte:Evo ta komanda /invite
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(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] < 3)
					{
						SendClientMessage(playerid, COLOR_GREY, "[GRESKA] Igrac mora biti minimum level 3! ");
						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 = "La Familia Signatra"; ChosenSkin[para1] = 70; SetPlayerSkin(para1, 70); }
					        else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "FBI"; 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 = "GHS"; ChosenSkin[para1] = 117; SetPlayerSkin(para1, 117); }// NOVA ORG
					        else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "[BM] 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 = "Ballas Family"; ChosenSkin[para1] = 103; SetPlayerSkin(para1, 103); }
							else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 14; gTeam[para1] = 14; ftext = "Los Surenos"; ChosenSkin[para1] = 114; SetPlayerSkin(para1, 114); }// NOVA ORG
					        else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 15; gTeam[para1] = 15; ftext = "MS-13"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }
					        else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 16; gTeam[para1] = 16; ftext = "Grove Street Family"; 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);
						}
						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;
	}

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

LOCK

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

Zasto ti je tema lockana:

Naslov teme nije po pravilniku.

PRAVILA:

GLAVNA PRAVILA BALKAN SAMP ZAJEDNICE - http://balkan-samp.com/forum/index.php?topic=7045.0

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