Problem with my code it doesn't display the reason !!!!! [FIXED]
#1

ok sooo im really confused now
code :

pawn Код:
dcmd_stopvote(playerid,params[])
{
    new reason[128], str[50];
    if (!strlen(params))
    {
      Vote[InProgress]=false;
      Vote[Votes]=0;
      for (new i=0; i<MAX_PLAYERS+1; i++) if (IsPlayerConnected(i)) Voted[i]=0;
        format(str,sizeof(str),"The Vote Has Been Stoped By %s .",PlayerName(playerid));
        SendClientMessageToAll(yellow,str);
    }
    else
    {
      sscanf(params,"s",reason);
        Vote[InProgress]=false;
      Vote[Votes]=0;
      for (new i=0; i<MAX_PLAYERS+1; i++) if (IsPlayerConnected(i)) Voted[i]=0;
        format(str,sizeof(str),"The Vote Has Been Stoped By %s . Reason : %s",PlayerName(playerid),reason);
        SendClientMessageToAll(yellow,str);
    }
    return true;
}
it just displays when i typed /votestop test :
"The Vote Has Been Stoped By Micko9 . Reason :"
and empty
nothing at reason!

i tryed also

Код:
reason=strval(params);


Edit : Fixed $.$ the str size was too short...what a lol reason lol

Fixed! Thanks for reading
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)