11.08.2012, 20:47
Hi !!
I have an /invite command to invite players to a organisation/mafia
And i want that to be on a dialog can somebody make it for me ? PLEASE REPP +++
becuse i dont know how :S
here is the cmd /invite
And for a dialog here it is . PRIFAKJAM is for "YES i will joni the mafia/org" and ODBIVAM is for "No i dont want"
PLEASEE I DONT KNOW HOW
I have an /invite command to invite players to a organisation/mafia
And i want that to be on a dialog can somebody make it for me ? PLEASE REPP +++
becuse i dont know how :S
here is the cmd /invite
pawn Код:
//----------------------------------[INVITE]------------------------------------------------
if(strcmp(cmd, "/invite", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /invite [playerid/PartOfName]");
return 1;
}
new para1;
new ftext[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(PlayerInfo[playerid][pLeader] == 1) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "PD"; ChosenSkin[para1] = 282; SetPlayerSkin(para1, 282); }
else if(PlayerInfo[playerid][pLeader] == 2) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "MBI"; ChosenSkin[para1] = 24; SetPlayerSkin(para1, 24); }
else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "ARM"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }
else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "MD-Bolnica"; ChosenSkin[para1] = 284; SetPlayerSkin(para1, 276); }
else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "La Cosa Nostra"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); }
else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 112; SetPlayerSkin(para1, 112); }
else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Vlada"; ChosenSkin[para1] = 20; SetPlayerSkin(para1, 164); }
else if(PlayerInfo[playerid][pLeader] == 8) { PlayerInfo[para1][pTeam] = 10; gTeam[para1] = 12; ftext = "Hitman"; ChosenSkin[para1] = 20; SetPlayerSkin(para1, 20); }
else if(PlayerInfo[playerid][pLeader] == 9) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Kanal 7"; ChosenSkin[para1] = 1; SetPlayerSkin(para1, 1); }
else if(PlayerInfo[playerid][pLeader] == 10) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Taxi "; ChosenSkin[para1] = 210; SetPlayerSkin(para1, 210); }
else if(PlayerInfo[playerid][pLeader] == 11) { PlayerInfo[para1][pTeam] = 12; gTeam[para1] = 12; ftext = "Obezbeduvanje"; ChosenSkin[para1] = 6; SetPlayerSkin(para1, 6); }
else if(PlayerInfo[playerid][pLeader] == 12) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Los Santos Gang"; ChosenSkin[para1] = 103; SetPlayerSkin(para1, 103); }
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "GSF"; ChosenSkin[para1] = 175; SetPlayerSkin(para1, 175); }
else if(PlayerInfo[playerid][pLeader] == 14) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Carbon Racer's"; ChosenSkin[para1] = 23; SetPlayerSkin(para1, 23); }
else if(PlayerInfo[playerid][pLeader] == 15) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Groove Street"; ChosenSkin[para1] = 105; SetPlayerSkin(para1, 105); }
else if(PlayerInfo[playerid][pLeader] == 16) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "LSV"; ChosenSkin[para1] = 108; SetPlayerSkin(para1, 108); }
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 Go prikluci %s za vlez vo %s.", sendername, giveplayer, ftext);
format(string, sizeof(string), " Se priklucivte vo %s, pokaneti ste od lider %s", ftext, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Go pokanivte %s vo %s.", giveplayer,ftext);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
}
}//not connected
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " {FF0000}GRESKA:{FFFFFF}Nemozete da ja koristite ovaa komanda samo Lideri.");
}
}
return 1;
}
pawn Код:
//----------------------------------[INVITE]------------------------------------------------
if(strcmp(cmd, "/pokani", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, WHITE, ""COL_ORANGE"KORISTETE:{FFFFFF} /invite [playerid/PartOfName]");
return 1;
}
new para1;
new ftext[20];
para1 = ReturnUser(tmp);
if (PlayerInfo[playerid][pLeader] >= 1)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
ShowPlayerDialog(para1, 115, DIALOG_STYLE_MSGBOX, "Pokana za vo Org/Banda/Mafija","Jas te pokanuvam da bides moj clen\n-Dokolku prifakjate pritisnete 'Prifakjam'\n-Dokolku odbivate pritisnete 'Odbivam'","Prifakjam","Odbivam");
format(string, sizeof(string), "* %s go pokanuva %s da bide negov clen.", sendername ,giveplayer);
ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}//not connected
}
else
{
SendClientMessage(playerid, WHITE, ""COL_RED"GRESKA:{FFFFFF}Ne ste ovlasteni za ovaa komanda, samo Lider");
}
}
return 1;
}
PLEASEE I DONT KNOW HOW