20.07.2012, 12:26
/showbuletin doesent show the player shat im show identification why did admins erase my topic??
PHP код:
if(strcmp(cmd,"/showbuletin",true)==0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /showbuletin [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(PlayerInfo[playerid][pBuletin] < 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You don't have a buletin to show!");
}
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Show your Buletin to yourself, use /buletin!"); return 1; }
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new otext[20];
new atext[20];
new str[256];
if(PlayerInfo[playerid][pOrigin] == 1) { otext = "Romania"; }
else if(PlayerInfo[playerid][pOrigin] == 2) { otext = "Bucuresti"; }
else if(PlayerInfo[playerid][pOrigin] == 3) { otext = "Sibiu"; }
else if(PlayerInfo[playerid][pOrigin] == 4) { otext = "Brasov"; }
if(PlayerInfo[playerid][pSex] == 1) { atext = "Masculin"; }
else if(PlayerInfo[playerid][pSex] == 2) { atext = "Feminin"; }
SendClientMessage(playerid, COLOR_ORANGE, str);
format(string, sizeof(string), "* %s has shown his Buletin to you.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* You have shown your Buletin to %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(str,sizeof(str), "|-----------|ROMANIA|----------|",giveplayer);
SendClientMessage(playerid, COLOR_ORANGE, str);
format(str,sizeof(str), "Nume: %s",giveplayer);
SendClientMessage(playerid, COLOR_WHITE, str);
format(str,sizeof(str), "Varsta: %d",PlayerInfo[playerid][pAge],giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, str);
format(str,sizeof(str), "Origin: %s",otext,giveplayer);
SendClientMessage(playerid, COLOR_LIGHTRED, str);
format(str,sizeof(str), "Sex: %s",atext,giveplayer);
SendClientMessage(playerid, COLOR_YELLOW, str);
format(str,sizeof(str), "|-------------------------------|",giveplayer);
SendClientMessage(playerid, COLOR_ORANGE, str);
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is not near you !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
return 1;
}