Why this send message with random number ?
#1

PHP код:
CMD:sex(playerid, params[])
{
    new 
string[128], playerb;
    if(
WhoreTime[playerid] > 0)
    {
    
format(string, sizeof(string), "You need to wait %d more seconds before offering sex to someone again.", WhoreTime[playerid]);
    
SendClientMessage(playerid, COLOR_GREY, string);
    return 
1;
    }
    if(
PlayerInfo[playerid][pJob] != JOB_WHORE && PlayerInfo[playerid][pVIPJob] != JOB_WHORE) return SendClientMessage(playerid, COLOR_GREY, "You are not a Whore.");
    if(
sscanf(params, "us[32]d", playerb, sexprice))
    {
        
SendClientMessage(playerid, COLOR_WHITE, "[Usage]: /sex [playerid] [price]");
        return 
1;
    }
    if(!
IsPlayerNearPlayer(playerid, playerb, 5)) return SendClientMessage(playerid, COLOR_GREY, "You can't give anything to someone from this disatance.");
    if(!
IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player specified.");
    if(
IsPlayerCuffed(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You can't do this right now.");
    
format(string, sizeof(string), " You have offered have sex with %s for $%d.", RPN(playerb), sexprice);
    
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
    
format(string, sizeof(string), " %s has offered you to have sex for $%d. (/asex) (/csex)", RPN(playerid), sexprice);
    
SendClientMessage(playerb, COLOR_LIGHTBLUE, string);
    
SexBy[playerb] = playerid;
    
Sex[playerb] = 0;
    return 
1;
} 
Everytime i use it sends " You have offered have sex with %s for [RANDOM NUMBER]." Why is this ?
Reply
#2

Код:
if(sscanf(params, "ri", playerb, sexprice))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)