8 Warnings in Jail-Command
#6

Replace this
pawn Код:
format(str, sizeof(str), "You jailed %s for %d mins.", GetPlayerName(playerid, const name[], len), mins);
To
pawn Код:
format(str, sizeof(str), "You jailed %s for %d mins.", Name2, mins);
Also, this
pawn Код:
format(str, sizeof(str), "%s jailed you for %d mins.", GetPlayerName(playerid, const name[], len), mins);
To
pawn Код:
format(str, sizeof(str), "%s jailed you for %d mins.", Name, mins);
Last,
pawn Код:
format(str, sizeof(str), "Administrator %s has jailed %s for %d mins!", GetPlayerName(playerid, const name[], len), GetPlayerName(playerid, const name[], len), mins);
To
pawn Код:
format(str, sizeof(str), "Administrator %s has jailed %s for %d mins!", Name, Name2, mins);
These are the parameters
pawn Код:
GetPlayerName(playerid, const name[], len)
So, you make a new variable with MAX_PLAYER_NAME.
pawn Код:
new
    Name[ MAX_PLAYER_NAME ];

GetPlayerName( playerid, Name, sizeof( Name ) ); // We get the Name from the player and we store it to `Name`
On the format messages, you have to use "%s" -> Name.
It will show the name.
Reply


Messages In This Thread
8 Warnings in Jail-Command - by Twisted_Insane - 06.02.2012, 18:11
Re: 8 Warnings in Jail-Command - by Max_Coldheart - 06.02.2012, 18:13
Re: 8 Warnings in Jail-Command - by Twisted_Insane - 06.02.2012, 18:17
Re: 8 Warnings in Jail-Command - by Vince - 08.02.2012, 13:03
Re: 8 Warnings in Jail-Command - by Twisted_Insane - 08.02.2012, 13:23
Re: 8 Warnings in Jail-Command - by Konstantinos - 08.02.2012, 13:41
Re: 8 Warnings in Jail-Command - by Cameltoe - 08.02.2012, 13:50
Re: 8 Warnings in Jail-Command - by Twisted_Insane - 08.02.2012, 14:15
Re: 8 Warnings in Jail-Command - by Cameltoe - 08.02.2012, 14:27
Re: 8 Warnings in Jail-Command - by Twisted_Insane - 08.02.2012, 15:08

Forum Jump:


Users browsing this thread: 1 Guest(s)