24.10.2010, 10:29
pawn Код:
new giveplayer[20];
if (!sscanf(params, "i",giveplayer )||!sscanf(params, "s[20]",giveplayer))
{
new para1;
para1 = ReturnUser(giveplayer);
//bla bla rest of the code
}
new giveplayer[20];
if (!sscanf(params, "i",giveplayer )||!sscanf(params, "s[20]",giveplayer))
{
new para1;
para1 = ReturnUser(giveplayer);
//bla bla rest of the code
}
COMMAND:uninvite(playerid, params[])
{
if(PlayerInfo[playerid][Leader] > 0)
{
new giveplayer[20];
if (!sscanf(params, "i",giveplayer )||!sscanf(params, "s[20]",giveplayer))
{
new para1;
para1 = ReturnUser(giveplayer);
if(para1 != INVALID_PLAYER_ID)
{
if (PlayerInfo[para1][Loggedin] != 0)
{
if (PlayerInfo[para1][Faction] == PlayerInfo[playerid][Leader])
{
new sendername[MAX_PLAYER_NAME];
new string[56];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Has uninvited you from his faction",sendername);
SendClientMessage(para1,culoare,string);
PlayerInfo[para1][Faction] = 0;
SetPlayerSkin(para1,25);
return 1;
}
else
{
SendClientMessage(playerid, culoare, "ERROR : That player is not in your faction");
return 1;
}
}
else
{
SendClientMessage(playerid, culoare, "ERROR: Player Not logged in");
return 1;
}
}
else
{
SendClientMessage(playerid, culoare, "ERROR : Invalid player");
return 1;
}
}
else
{
SendClientMessage(playerid, culoare, "Use : /invite [playerid]");
return 1;
}
}
return 1;
}
COMMAND:uninvite(playerid, params[])
{
if(PlayerInfo[playerid][Leader] > 0)
{
new player;
if (sscanf(params, "u",player))
{
new player;
if(player != INVALID_PLAYER_ID)
{
if (PlayerInfo[player][Loggedin] != 0)
{
if(PlayerInfo[player][Faction] == PlayerInfo[playerid][Leader])
{
new string[56];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s Has uninvited you from his faction",sendername);
SendClientMessage(player,culoare,string);
PlayerInfo[player][Faction] = 0;
SetPlayerSkin(player,25);
return 1;
}
else
{
SendClientMessage(playerid, culoare, "ERROR : That player is not in your faction");
}
}
else
{
SendClientMessage(playerid, culoare, "ERROR: Player Not logged in");
}
}
}
else
{
SendClientMessage(playerid, culoare, "Use : /invite [playerid]");
}
}
return 1;
}