A little help here. - 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: A little help here. (
/showthread.php?tid=122997)
A little help here. -
Sal_Kings - 24.01.2010
Well, there is a small problem.
What I'm trying to do is make a command so when you type /plant it will save that position you are in so later when you type /explode it will create a explosion at that position you saved when you type /plant.
Код:
if (strcmp("/Plant", cmdtext, true, 10) == 0)
{
GetPlayerPos(playerid,bombpos); // Here I'm trying to save the bomb pos for the explode part.
return 1;
}
Код:
if (strcmp("/explode", cmdtext, true, 10) == 0)
{
CreateExplosion(bombpos, 12, 10.0); // This is suppose to make a explosion at the area bomb pos which was "suppose" to be saved earlier.
return 1;
}
Re: A little help here. -
Striker_Moe - 24.01.2010
Somewhere on Top:
pawn Код:
new Float:bombx[MAX_PLAYERS];
new Float:bomby[MAX_PLAYERS];
new Float:bombz[MAX_PLAYERS];
Then on /plant:
pawn Код:
GetPlayerPos(playerid,bombx[playerid],bomby[playerid],bombz[playerid]);
Then on /explode:
pawn Код:
CreateExplosion(bombx[playerid],bomby[playerid],bombz[playerid],12,10.0);
PS: Hi Sal. Remember me?
Re: A little help here. -
Sal_Kings - 24.01.2010
Thanks, and yes I remember you.
There are just errors on one line.
Код:
E:\Documents and Settings\salim\My Documents\PAWN\filterscripts\Bomb.pwn(99) : error 017: undefined symbol "bombx"
E:\Documents and Settings\salim\My Documents\PAWN\filterscripts\Bomb.pwn(99) : warning 215: expression has no effect
E:\Documents and Settings\salim\My Documents\PAWN\filterscripts\Bomb.pwn(99) : error 001: expected token: ";", but found "]"
E:\Documents and Settings\salim\My Documents\PAWN\filterscripts\Bomb.pwn(99) : error 029: invalid expression, assumed zero
E:\Documents and Settings\salim\My Documents\PAWN\filterscripts\Bomb.pwn(99) : fatal error 107: too many error messages on one
Код:
GetPlayerPos(playerid,bombx[playerid],bomby[playerid],bombz[playerid]);
Re: A little help here. -
Striker_Moe - 24.01.2010
Код:
error 017: undefined symbol "bombx"
Are you sure you placed the newґs straigt on the top, after the includes?
Код:
error 001: expected token: ";", but found "]"
You probably missed a ; on some other line near 99.
Mind sending me the script part? I could correct it for you.
Re: A little help here. -
Sal_Kings - 24.01.2010
That was the problem, thanks.