Problem with - SetPlayerSpecialAction - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with - SetPlayerSpecialAction (
/showthread.php?tid=452659)
Problem with - SetPlayerSpecialAction -
Rafibloszek - 22.07.2013
Код:
COMMAND:akcja(playerid, params[])
{
new str[128], tmp[24];
if(sscanf(params, "d", tmp))
{
PlayerPlaySound(playerid, 1083, 0, 0, 0);
ShowPlayerDialog(playerid,3001,DIALOG_STYLE_MSGBOX,"Uzycie komendy /akcja","/akcja [numer akcji]","Zamknij","");
return 1;
}
{
format(str, sizeof(str), "Użyłeś akcji z typem x: %s", tmp);
SendClientMessage(playerid, 0xFFCC0000, str);
SetPlayerSpecialAction(playerid, tmp);
}
return 1;
}
Error which i have:
Код:
(442) : error 035: argument type mismatch (argument 2)
Error is about that line:
Код:
SetPlayerSpecialAction(playerid, tmp);
Someone can help me?
Re: Problem with - SetPlayerSpecialAction -
Misiur - 22.07.2013
You need an integer, not an array/string.
pawn Код:
tmp[24] -> tmp
format(str, sizeof(str), "Użyłeś akcji z typem x: %s", tmp) -> format(str, sizeof(str), "Użyłeś akcji z typem x: %d", tmp)
Re: Problem with - SetPlayerSpecialAction -
Rafibloszek - 22.07.2013
Thank you, a raczej dzięki Ci bardzo.
Wszystko działa.
Jeśli można prosić, to mogę prosić o kontakt na gg lub skype? (585097 lub rafibloszek2)