Help with one of my codes!
#1

Hey. Thank you for checking this out. I have a code like this:

---------------------------------------------------------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/missle", cmdtext, true, 7) == 0)
{
if(strlen(cmdtext[8]) == 0) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /missle <PlayerID>");
if(IsPlayerConnected(strval(cmdtext[8])) == 0) return SendClientMessage(playerid, 0xFF0000AA, "Player Not Found");

new FloatX, FloatY, FloatZ, Float:vX, Float:vY, Float:vZ;
GetPlayerPos(playerid, pX, pY, pZ);
GetPlayerPos(strval(cmdtext[8]), vX, vY, vZ);

if(pX - vX < 10 && pX - vX > -10 && pY - vY < 10 && pY - vY > -10 && pZ - vZ < 10 && pZ - vZ > -10)
{
CreateExplosion(?);
SendClientMessage(strval(cmdtext[8]), 0x00FF00AA, "You have been exploded.");
SendClientMessage(playerid, 0x00FF00AA, "Player Destroyed");
}
else
{
SendClientMessage(playerid, 0xFF0000AA, "You are too far apart.");
}
return 1;
}
return 0;
}

------------------------------------------------------------------------------------------------
But as you can see where it says CreateExplosion there is a question mark. There, how do you make a explosion at the other players position. I tried CreateExplosion(strval, X, Y, Z, 50.0); But i get error and i dont know if its right. Please help!!! TY!!!!
Reply


Messages In This Thread
Help with one of my codes! - by Yoyoyo - 01.03.2009, 23:26
Re: Help with one of my codes! - by 1337pr0 - 02.03.2009, 00:08
Re: Help with one of my codes! - by Yoyoyo - 02.03.2009, 02:17

Forum Jump:


Users browsing this thread: 1 Guest(s)