23.04.2012, 16:27
Hi I would ask you because I do not know yet good script please if you can I do / invite command when you press Accept to change plucked by the organization and if pressed refuse not to change break and remain where he was and if grit also accept change and be plucked in the org / mafia / gang
Command:
//----------------------------------[INVITE]------------------------------------------------
if(strcmp(cmd, "/invite", 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, 0, 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_PURPL E,COLOR_PURPLE);
}
}//not connected
}
else
{
SendClientMessage(playerid, WHITE, ""COL_RED"GRESKA:{FFFFFF}Ne ste ovlasteni za ovaa komanda, samo Lider");
}
}
return 1;
}
Dialog:
if(dialogid == 0)
{
if(response)
{
new para1;
new ftext[20];
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 = "FBI"; ChosenSkin[para1] = 24; SetPlayerSkin(para1, 24); }
else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "SWAT"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }
else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "MD"; ChosenSkin[para1] = 276; SetPlayerSkin(para1, 276); }
else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); }
else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "LCN"; ChosenSkin[para1] = 112; SetPlayerSkin(para1, 112); }
else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "VLADA"; ChosenSkin[para1] = 164; SetPlayerSkin(para1, 164); }
else if(PlayerInfo[playerid][pLeader] == { 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 = "LSN"; 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] == 12) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "LSG"; ChosenSkin[para1] = 175; SetPlayerSkin(para1, 175); }
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Los Surenos"; 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 = "GSF"; 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, 10; }
else { return 1; }
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
}
}
Please HELP ME !
Command:
//----------------------------------[INVITE]------------------------------------------------
if(strcmp(cmd, "/invite", 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, 0, 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_PURPL E,COLOR_PURPLE);
}
}//not connected
}
else
{
SendClientMessage(playerid, WHITE, ""COL_RED"GRESKA:{FFFFFF}Ne ste ovlasteni za ovaa komanda, samo Lider");
}
}
return 1;
}
Dialog:
if(dialogid == 0)
{
if(response)
{
new para1;
new ftext[20];
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 = "FBI"; ChosenSkin[para1] = 24; SetPlayerSkin(para1, 24); }
else if(PlayerInfo[playerid][pLeader] == 3) { PlayerInfo[para1][pTeam] = 2; gTeam[para1] = 2; ftext = "SWAT"; ChosenSkin[para1] = 285; SetPlayerSkin(para1, 285); }
else if(PlayerInfo[playerid][pLeader] == 4) { PlayerInfo[para1][pTeam] = 1; gTeam[para1] = 1; ftext = "MD"; ChosenSkin[para1] = 276; SetPlayerSkin(para1, 276); }
else if(PlayerInfo[playerid][pLeader] == 5) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Yakuza"; ChosenSkin[para1] = 121; SetPlayerSkin(para1, 121); }
else if(PlayerInfo[playerid][pLeader] == 6) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "LCN"; ChosenSkin[para1] = 112; SetPlayerSkin(para1, 112); }
else if(PlayerInfo[playerid][pLeader] == 7) { PlayerInfo[para1][pTeam] = 7; gTeam[para1] = 7; ftext = "VLADA"; ChosenSkin[para1] = 164; SetPlayerSkin(para1, 164); }
else if(PlayerInfo[playerid][pLeader] == { 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 = "LSN"; 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] == 12) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "LSG"; ChosenSkin[para1] = 175; SetPlayerSkin(para1, 175); }
else if(PlayerInfo[playerid][pLeader] == 13) { PlayerInfo[para1][pTeam] = 5; gTeam[para1] = 5; ftext = "Los Surenos"; 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 = "GSF"; 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, 10; }
else { return 1; }
PlayerInfo[para1][pMember] = PlayerInfo[playerid][pLeader];
PlayerInfo[para1][pRank] = 1;
}
}
Please HELP ME !