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: Help please! (
/showthread.php?tid=218716)
Help please! -
murdoxix - 30.01.2011
Hi, i use Raven's GM! but i got problems with /ddcount. when i type the command the count start but start in 0, then -1 -2 -3 -4 ,etc! and never finish. only when i restart the server.. CODES:
Command code:
pawn Код:
if(strcmp(cmd,"/ddcount",true) == 0 || strcmp(cmd,"/ddcd",true) == 0)
{
if(PlayerInfo[playerid][pDM] == 1)
{
ddcounttimer = SetTimer("DDCountdown", 1000, true);
}
return 1;
}
Other code:
pawn Код:
public DDCountdown()
{
new string[64];
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i,400,-1398.3799,994.8915,1024.0889))
{
ddcount --;
if(ddcount != -20)
{
format(string, sizeof(string),"~r~DD Countdown: ~n~~n~%d",ddcount);
}
else
{
format(string, sizeof(string),"~r~DD Countdown: ~n~~n~~g~GO GO GO!",ddcount);
KillTimer(ddcounttimer);
}
GameTextForPlayer(i,string,1000,4);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(i, X,Y,Z);
PlayerPlaySound(i, 1056, X, Y, Z);
}
}
}
return 1;
}
And whats i need add for when a car enter in DD the car repair?? THANKSS! AND HELP ME PLEASE!
sorry for my bad english
Re: Help please! -
ricardo178 - 30.01.2011
LOL, guys, i alried tryed to help him but cant...
P.S: Change
to positive dont work too, (it was me who asked him to put -20 and dont worked)
Re: Help please! -
murdoxix - 30.01.2011
ricardo178 thanks for help me :P!
Re: Help please! -
ricardo178 - 30.01.2011
np, but it did work?
Re: Help please! -
murdoxix - 30.01.2011
no, no work :S
Re: Help please! -
ricardo178 - 30.01.2011
Ok, i will see if it have something more... btw i will post my code!
cmd:
pawn Код:
if(strcmp(cmd,"/ddcount",true) == 0 || strcmp(cmd,"/ddcd",true) == 0) // By CuervO_NegrO
{
if(PlayerInfo[playerid][pDM] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pDTK] == 1 ||PlayerInfo[i][pDSTK] == 1 || IsPlayerInRangeOfPoint(i,250,-1398.3799,994.8915,1024.0889))
{
SetTimer("DD1", 1000, false);
SetTimer("DD2", 2000, false);
SetTimer("DD3", 3000, false);
SetTimer("DD4", 4000, false);
SetTimer("DD5", 5000, false);
SetTimer("DD6", 6000, false);
}
}
}
}
return 1;
}
Re: Help please! -
murdoxix - 30.01.2011
SCREEN SHOOT:
Re: Help please! -
murdoxix - 30.01.2011
i change my command, for you command and i get 2 warniongas:
C:\Users\Alexx!\Desktop\Rosario Server\gamemodes\larp.pwn(56820) : warning 217: loose indentation
C:\Users\Alexx!\Desktop\Rosario Server\gamemodes\larp.pwn(56843) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Warnings.
Re: Help please! -
murdoxix - 30.01.2011
Mmm, now no appear the message LOL! i type the command, and nathing XD!
Re: Help please! -
ricardo178 - 30.01.2011
You replaced your cmd for mine and deleted the ddcount public?