12.05.2011, 22:08
Ok, i got a script, and this script works in a gamemode but in the other its bugged
Can someone tell me why, i installed it correctly
Can someone tell me why it doesn't works at the other gamemode?
Can someone tell me why, i installed it correctly
pawn Код:
if(strcmp(cmd,"/makeleader",true)==0)
{
new PlayerName[24]; // We create a variable which will contain the players name.
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(strcmp(PlayerName,"[LSB]TheGame[TS]",true)) // We use strcmp to check if the player who entered the car is the same as 'Matthias'
{
SendClientMessage(playerid, RED, "SERVER MESSAGE: You are not the Server Owner!");
return 1;
}
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "INFO: /makeleader [playerid] [factionname]");
if(strlen(tmp2) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "INFO: /makeleader [playerid] [factionname]");
{
if(!IsPlayerConnected(strval(tmp))) return SendClientMessage(playerid, COLOR_RED, "ERROR : This player is not connected!");
if(!strcmp(tmp2,"GS"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][GSLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the Grove Street Families Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"SBF"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][SBFLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the Seville Boulevard Families Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"TDF"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][TDFLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the Temple Drive Families Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"IB"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][IBLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the Front Yard Ballas Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"JB"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][JBLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the Rollin Height Ballas Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"KTB"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][KTBLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the Kilo Tray Ballas Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"V"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][VLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the East Beach Vagos Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"Varios"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][VariosLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the El Corona Aztecas Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"TDB"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][TDBLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the Temple Drive Ballas Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"FF"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][FFLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the Forelli Family Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"rifas"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][RIFASLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the Los Santos Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"ELS"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][ELSLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the East Los Santos Ballas Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
if(!strcmp(tmp2,"LC"))
{
new otherplayerid;
otherplayerid = strval(tmp);
PlayerData[otherplayerid][LCLeader] = 1;
new otherid[24];
GetPlayerName(otherplayerid, otherid, sizeof(otherid));
format(string, sizeof string, "%s has been given the Los Cabrones Cartel Leader Rights by [LSB]TheGame[TS]", otherid);
SendClientMessageToAll(RED, string);
SendClientMessage(otherplayerid,ORANGE, "** To check your commands as leader. type /leaderinfo");
SendClientMessage(otherplayerid,ORANGE, "* Read about the street credit at /streetcredit or wwww.lsbclan.com");
return 1;
}
else
{
SendClientMessage(playerid, RED, " You didn't type a right faction name");
}
return 1;
}
}