[HELP] need a quick help -
jiwan - 20.10.2011
I have made this command which creates explosion similar to /airstrike but i don't know how to get the position of player who uses this command

can u help me please !
Код:
if (strcmp("/cannonfire", cmdtext, true, 10) == 0)
{
CreateExplosion(x, y, z, 6, 15);//cordinates to be written yet :D
SendClientMessage(playerid, 0xFF0000FF, "Cannon fire on your position in 6 Seconds and counting!");
return 1;
}
Re: [HELP] need a quick help -
=WoR=Varth - 20.10.2011
https://sampwiki.blast.hk/wiki/GetPlayerPos
Re: [HELP] need a quick help -
Mr_Scripter - 20.10.2011
pawn Код:
GetPlayerPos(playerid, FLoat:x, Float:y, FLoat:z);
Re: [HELP] need a quick help -
jiwan - 20.10.2011
Quote:
Originally Posted by =WoR=Varth
|
can you tell meh what will be the command then i am new to this !
Re: [HELP] need a quick help -
nilanjay - 20.10.2011
pawn Код:
public OnPlayerDisconnect(playerid)
{
// This is used to save the players last postion and spawn him back when he joins again.
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
return 1;
}
Re: [HELP] need a quick help -
jiwan - 20.10.2011
thx nilanjay

but i want to add that in this code how to do this
Код:
if (strcmp("/cannonfire", cmdtext, true, 10) == 0)
{
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, -1, "You dont have Enough Money For a Cannon Strike");
CreateExplosion(, , , 6, 15);//cordinates to be written yet :D
SendClientMessage(playerid, 0xFF0000FF, "Cannon fire on your position in 6 Seconds and counting!");
GivePlayerMoney(playerid, -10000);//take his money
return 1;
}
i also want to add timer of 6 seconds !
Re: [HELP] need a quick help -
nilanjay - 20.10.2011
For timer you can see a tutorial
Re: [HELP] need a quick help -
nilanjay - 20.10.2011
I think you shoiuld make your current code like this
pawn Код:
if (strcmp("/cannonfire", cmdtext, true, 10) == 0)
{
if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, -1, "You dont have Enough Money For a Cannon Strike");
else
{
CreateExplosion(, , , 6, 15);//cordinates to be written yet :D
SendClientMessage(playerid, 0xFF0000FF, "Cannon fire on your position in 6 Seconds and counting!");
GivePlayerMoney(playerid, -10000);//take his money
}
return 1;
}
Re: [HELP] need a quick help -
nilanjay - 20.10.2011
You are saying that when a player use the command then all the players should get a msg?
Re: [HELP] need a quick help -
jiwan - 20.10.2011
Quote:
Originally Posted by nilanjay
For timer you can see a tutorial
|
which 1 please post a link