Quick Answer... - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Quick Answer... (
/showthread.php?tid=235597)
Quick Answer... -
Amel_PAtomAXx - 06.03.2011
IM making gate,, and i have little problem with SentClientMessage
C:\Documents and Settings\xy\Desktop\SAMP\samp03csvr_win32\gamemode s\rp3.pwn(467) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
code:
PHP код:
if(strcmp(cmdtext, "/flyo", true) == 0)
{
new string[1];
new movetime = MoveObject(helipad2, 548.59000000,-2797.09000000,13.06000000,5.00000000);
SetTimer("aclose2", 3000, 0);
SendClientMessage(playerid, "You opening a hunter cage , gate will be closed for 3 seconds.");
format(string, sizeof(string), "Object will finish moving in %d milliseconds", movetime);
return 1;
}
Re: Quick Answer... -
admantis - 06.03.2011
What's the line? By the way, make your string size bigger (not 256 yet) or it will only show a "O"
Re: Quick Answer... -
dr.pepper - 06.03.2011
Wrong code:
---------------
Is this your solution/answer?
PHP код:
new string[128];
Re: Quick Answer... -
Amel_PAtomAXx - 06.03.2011
can you fix this please
Re: Quick Answer... -
admantis - 06.03.2011
Why you need to create and format the string if time is always 3000 miliseconds? It's a static time, it won't change regarding of the player command.
pawn Код:
if(strcmp(cmdtext, "/flyo", true) == 0)
{
new movetime = MoveObject(helipad2, 548.59000000,-2797.09000000,13.06000000,5.00000000);
SetTimer("aclose2", 3000, 0);
SendClientMessage(playerid, "You opening a hunter cage , gate will be closed for 3 seconds.");
SendClientMessage(playerid, "Object will finish moving in 3000 milliseconds");
return 1;
}
Re: Quick Answer... -
Marricio - 06.03.2011
pawn Код:
if(strcmp(cmdtext, "/flyo", true) == 0)
{
new movetime = MoveObject(helipad2, 548.59000000,-2797.09000000,13.06000000,5.00000000);
SetTimer("aclose2", 3000, 0);
SendClientMessage(playerid,-1, "You opening a hunter cage , gate will be closed for 3 seconds.");
SendClientMessage(playerid, "Object will finish moving in 3000 milliseconds");
return 1;
}
You had missing a param in the SendClientMessage format.. (color)
pawn Код:
SendClientMessage(playerid,color,message);
Re: Quick Answer... -
Amel_PAtomAXx - 06.03.2011
Its work now ,, thanks guys ..