pawn Код:
#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;
}
The only thing you have to do, is to check their position if theyre in the mall and if they have enough money or not.