12.01.2010, 12:32
i have prob,its with my id,if i want to show id,it will show raises his hand and hands id to(nothing) .
and it wont show the information correctly,really need this thanks
pawn Код:
else if(strcmp(x_nr,"id",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /give id [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(ProxDetectorS(5.0, playerid, giveplayerid))
{
format(string, sizeof(string), "* %s raises a hand and hands a id to %s.", sendername, giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(PlayerInfo[playerid][pPassport] == 1)
{
// new targetid = Spectate[playerid];
new otaxt[20];
new sextext[20];
new agetext = PlayerInfo[playerid][pAge];
if(PlayerInfo[playerid][pSex] == 1) { sextext = "Male"; }
else if(PlayerInfo[playerid][pSex] == 2) { sextext = "Female"; }
if(PlayerInfo[playerid][pOrigin] == 1) { otaxt = "USA"; }
else if(PlayerInfo[playerid][pOrigin] == 2) { otaxt = "Europe"; }
else if(PlayerInfo[playerid][pOrigin] == 3) { otaxt = "Asia"; }
else if(PlayerInfo[playerid][pOrigin] == 4) { otaxt = "Africa"; }
GetPlayerName(playerid, sendername, sizeof(sendername));
// new playa[MAX_PLAYER_NAME], string[48];
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new pName[20]; // What is the point in writing MAX_PLAYER_NAME when you can just write 20????????
GetPlayerName(playerid, pName, 20);
format(string, sizeof(string), "|__________ Passport of %s __________|", pName);
SendClientMessage(playerid, COLOR_WHITE, string);
GetPlayerName(playerid, pName, 20);
format(string, sizeof(string), "** Name: %s", pName);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "** Sex: %s", sextext);
SendClientMessage(playerid, COLOR_GREY, string);
format(string,sizeof(string),"** Age: %d",agetext);
SendClientMessage(playerid, COLOR_GREY, string);
format(string, sizeof(string), "** From: %s", otaxt);
SendClientMessage(playerid, COLOR_GREY, string);
SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________|");
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have a passport to give");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Player is not near you ! ");
return 1;
}
}
}
}