[Erro]SetPlayerShopName n tenho a minima noзao disso - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Erro]SetPlayerShopName n tenho a minima noзao disso (
/showthread.php?tid=179232)
[Erro]SetPlayerShopName n tenho a minima noзao disso -
Link_ - 26.09.2010
Eu achei um GM na net e ta dando erro nisso SetPlayerShopName,ReturnUser como faiz pratirar esse erro olhei no wiki mais n achei nada que possa resolver esse erro
Re: [Erro]SetPlayerShopName n tenho a minima noзao disso -
ipsBruno - 26.09.2010
https://sampwiki.blast.hk/wiki/SetPlayerShopName
e
pawn Код:
stock ReturnUser(text[], playerid = INVALID_PLAYER_ID)
{
new pos = 0;
while (text[pos] < 0x21)
{
if (text[pos] == 0) return INVALID_PLAYER_ID;
pos++;
}
new userid = INVALID_PLAYER_ID;
if (IsNumeric(text[pos]))
{
userid = strval(text[pos]);
if (userid >=0 && userid < MAX_PLAYERS)
{
if(!IsPlayerConnected(userid))
{
userid = INVALID_PLAYER_ID;
}
else
{
return userid;
}
}
}
new len = strlen(text[pos]);
new count = 0;
new aname[MAX_PLAYER_NAME];
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
GetPlayerName(i, aname, sizeof (aname));
if (strcmp(aname, text[pos], true, len) == 0)
{
if (len == strlen(aname))
{
return i;
}
else
{
count++;
userid = i;
}
}
}
}
if (count != 1)
{
if (playerid != INVALID_PLAYER_ID)
{
if (count)
{
SendClientMessage(playerid, 0xFF0000AA, "Multiple users found, please narrow search.");
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "No matching user found.");
}
}
userid = INVALID_PLAYER_ID;
}
return userid;
}
Re: [Erro]SetPlayerShopName n tenho a minima noзao disso -
Link_ - 26.09.2010
Vlw pela ajuda + da erro era um porque tinha 2 stock iguais vleu quando voce casa eu danзo xD