15.03.2011, 02:13
How i block
"~, #, @, !, -, _, ♣(etc), $%Ё&"
In this cmd ?
thank yo
"~, #, @, !, -, _, ♣(etc), $%Ё&"
In this cmd ?
pawn Код:
if(strcmp(cmd, "/bizname", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new bouse = PlayerInfo[playerid][pPbiskey];
if (bouse == 255)
{
SendClientMessage(playerid, COLOR_GRAD2, " You don't own a business");
return 1;
}
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[128];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_WHITE, "USE: /bizname [nome]");
}
if (bouse >= 100)
{
strmid(SBizzInfo[bouse-100][sbMessage], result, 0, 64, 255);
format(string, sizeof(string), "Business name set to %s",SBizzInfo[bouse-100][sbMessage]);
OnPropUpdate(3,bouse);
OnPropTextdrawUpdate(3, bouse);
}
else
{
strmid(BizzInfo[bouse][bMessage], result, 0, 64, 255);
format(string, sizeof(string), "Business name set to %s",BizzInfo[bouse][bMessage]);
OnPropUpdate(2,bouse);
OnPropTextdrawUpdate(2, bouse);
}
SendClientMessage(playerid, COLOR_WHITE, string);
}
return 1;
}