09.04.2012, 16:57
Hello Everybody.
I have an problem at /sex command , because i want to do an Log to see who try to cheat , like /sex newacccount PRICE many times , and I did an log. But in Log doesen't appear sendername , appear 82. Like in this screen :
The Yellow part is the ABroadcast , to appear at admin , but you can see appear 82 not the sendername (Me)
The /sex code is
I have an problem at /sex command , because i want to do an Log to see who try to cheat , like /sex newacccount PRICE many times , and I did an log. But in Log doesen't appear sendername , appear 82. Like in this screen :

The Yellow part is the ABroadcast , to appear at admin , but you can see appear 82 not the sendername (Me)
The /sex code is
Код:
if(strcmp(cmd, "/sex", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pJob] == 3) { if(!IsPlayerInAnyVehicle(playerid)) { SendClientMessage(playerid, COLOR_GREY, " You can only have Sex in a Car !"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); new Car = GetPlayerVehicleID(playerid); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /sex [playerid/PartOfName] [price]"); return 1; } //giveplayerid = strval(tmp); giveplayerid = ReturnUser(tmp); tmp = strtok(cmdtext, idx); new money; money = strval(tmp); if(money < 1 || money > 99999) { SendClientMessage(playerid, COLOR_GREY, " Price not lower then 1, or above 99999!"); return 1; } if(IsPlayerConnected(giveplayerid)) { if(giveplayerid != INVALID_PLAYER_ID) { if (ProxDetectorS(8.0, playerid, giveplayerid)) { if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot have Sex with yourself!"); return 1; } if(IsPlayerInAnyVehicle(playerid) && IsPlayerInVehicle(giveplayerid, Car)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "* You offerd %s to have Sex with you, for $%d.", giveplayer, money); SendClientMessage(playerid, COLOR_WHITE, string); format(string, sizeof(string), "* Whore %s has offerd you to have Sex with her, for $%d (type /accept sex) to accept.", sendername, money); SendClientMessage(giveplayerid, COLOR_WHITE, string); SexOffer[giveplayerid] = playerid; SexPrice[giveplayerid] = money; format(string, sizeof(string), "* %d offerd %s to have Sex , for $%d.", sendername, giveplayer, money); SexLog(string); printf("%d offered to %s to have sex for $%s", sendername, giveplayer, money); ABroadCast(COLOR_YELLOW,string,1); } else { SendClientMessage(playerid, COLOR_GREY, " You or the other player must be in a Car together !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " That player is not near you !"); return 1; } } } else { SendClientMessage(playerid, COLOR_GREY, " That player is offline !"); return 1; } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a Whore !"); } }//not connected return 1; }