06.08.2012, 21:11
I have been searching for a filterscript that can allow players to pay and change their names while in game when they go to the city hall.
Can someone help me with this?
Can someone help me with this?
#include <a_samp>
#include <ysi\y_commands>
#include <sscanf2>
CMD:buyname(playerid, params[])
{
new nName[24];
if( !sscanf( params, "s[24]", nName ) )
{
new string[128];
switch( SetPlayerName(playerid, nName ) )
{
case -1: format( string, sizeof string, "Unable to change your name, someone else is known as '%s' already.", nName );
case 0: format( string, sizeof string, "You are already known as '%s'", nName );
case 1: format( string, sizeof string, "You are now known as '%s'", nName );
}
SendClientMessage( playerid, -1, string );
}
else return SendClientMessage( playerid, -1, "Usage: /buyname <name>" );
return 1;
}
pawn Код:
|