explode player
#1

What i am tring to do is if someone in the wrong class uses this command the will explode but i gt these errors


Код:
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\black.pwn(5206) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\black.pwn(5206 -- 5207) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\black.pwn(5207) : error 001: expected token: ";", but found "if"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Код:
if(strcmp(cmdtext, "/placemine", true) == 0)
 }
	if( gPlayerClass[playerid] == ENGINEER )
	{
	SetPlayerHealth(giveplayerid, 10);
	new Float:boomx, Float:boomy, Float:boomz;
	GetPlayerPos(giveplayerid,boomx, boomy, boomz);
	CreateExplosion(boomx, boomy , boomz, 7, 10);
  return 1;
	}
Reply
#2

pawn Код:
if(strcmp(cmdtext, "/placemine", true) == 0)
{
    if( gPlayerClass[playerid] == ENGINEER )
    {
    SetPlayerHealth(giveplayerid, 10);
    new Float:boomx, Float:boomy, Float:boomz;
    GetPlayerPos(giveplayerid,boomx, boomy, boomz);
    CreateExplosion(boomx, boomy , boomz, 7, 10);
    }
return 1;
}
Unsure if the command works, I just changed your { }'s about.
Reply
#3

nan command didnt work
Reply
#4

idk what u trying to do but if u want that if player is engineer and he type this command , he explode , here is it :
Код:
if(strcmp(cmdtext, "/placemine", true) == 0)
{
	if( gPlayerClass[playerid] == ENGINEER )
	{
	SetPlayerHealth(giveplayerid, 10);
	new Float:burnx, Float:burny, Float:burnz; GetPlayerPos(playerid,burnx, burny, burnz); CreateExplosion(burnx, burny , burnz, 7,10.0);
}
  return 1;
	}
Reply
#5

Quote:
Originally Posted by [AC
Etch ]
idk what u trying to do but if u want that if player is engineer and he type this command , he explode , here is it :
Код:
if(strcmp(cmdtext, "/placemine", true) == 0)
{
	if( gPlayerClass[playerid] == ENGINEER )
	{
	SetPlayerHealth(giveplayerid, 10);
	new Float:burnx, Float:burny, Float:burnz; GetPlayerPos(playerid,burnx, burny, burnz); CreateExplosion(burnx, burny , burnz, 7,10.0);
}
  return 1;
	}
and from where u get ''giveplayerid'' ? lol in this case u will get error
Reply
#6

Use playerid instead of giveplayerid
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)