Little help please? :) - 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: Little help please? :) (
/showthread.php?tid=231002)
Little help please? :) -
Janek17 - 24.02.2011
pawn Код:
C:\Documents and Settings\Janek\Desktop\URP TESTIMINE!\gamemodes\Testimine.pwn(304) : warning 206: redundant test: constant expression is non-zero
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
Please Help!!!
Re: Little help please? :) -
maramizo - 24.02.2011
Show me that line and it's neighbours.
Re: Little help please? :) -
Janek17 - 24.02.2011
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[Unyti-Peavдrav]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<//
if (strcmp("/upava", cmdtext, true, 10) == 1810.9568, -1889.4921, 13.4075 )
{
MoveObject(unytipeav2rav1, 1811.25964355, -1895.96801758, 5.0000000, 2.00 );
SetTimer("sule", 7000, 0); // Vдrav sulgub 7 sekundi pдrast
SendClientMessage(playerid,COLOR_GREEN,"Sa avasid Unyti Peavдrava, ning se sulgub 7 sekundi pдrast!");
return 1;
}
return 0;
}
Re: Little help please? :) -
[WSF]ThA_Devil - 24.02.2011
please define error line! we don't know the line what have errors!
Re: Little help please? :) -
Janek17 - 24.02.2011
pawn Код:
if (strcmp("/upava", cmdtext, true, 10) == 1810.9568, -1889.4921, 13.4075 )
Re: Little help please? :) -
[WSF]ThA_Devil - 24.02.2011
wtf ure tryting ot do lol? that won't work! try this:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
//>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>[Unyti-Peavдrav]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<//
if (strcmp("/upava", cmdtext, true, 10) == 0 )
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, 1810.9568, -1889.4921, 13.4075))
{
MoveObject(unytipeav2rav1, 1811.25964355, -1895.96801758, 5.0000000, 2.00 );
SetTimer("sule", 7000, 0); // Vдrav sulgub 7 sekundi pдrast
SendClientMessage(playerid,COLOR_GREEN,"Sa avasid Unyti Peavдrava, ning se sulgub 7 sekundi pдrast!");
}
return 1;
}
return 0;
}
Re: Little help please? :) -
Mean - 24.02.2011
That does nothing.
Should be:
pawn Код:
if( strcmp( "/upava", cmdtext, true, 10 ) == 0 )
EDIT: Slow.
Re: Little help please? :) -
Janek17 - 24.02.2011
Work now, tnks dud!
Re: Little help please? :) -
[WSF]ThA_Devil - 24.02.2011
xD he he
Re: Little help please? :) -
maramizo - 24.02.2011
Quote:
Originally Posted by Janek17
Work now, tnks dud! 
|
pawn Код:
if (strcmp("/command", cmdtext, true, 7) == 0 ) // Seven is the command length
That's usually how the commands using strcmp look like.
I suggest you throw that in the recycle bin, and start using ZCMD and SSCANF2.