What's the problem? -
reddoxx - 02.11.2017
The errors:
C:\Users\Lenovo\Downloads\SA-MP1\gamemodes\SanJoseRolePlay.pwn(22435) : error 001: expected token: "*then", but found ")"
C:\Users\Lenovo\Downloads\SA-MP1\gamemodes\SanJoseRolePlay.pwn(22435) : error 029: invalid expression, assumed zero
and there is the code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
new szString[144];
if weaponid = 23);
ApplyPlayerAnimation(playerid, "COLT45", "COLT45_RELOAD", 4.0, 0, 0, 0, 0, 0, 1);
return 1;
}
i want a system when a player shoots the tazer, play a reload animation
Re: What's the problem? -
Lucases - 02.11.2017
pawn Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
new szString[144];
if(weaponid == 23) ApplyPlayerAnimation(playerid, "COLT45", "COLT45_RELOAD", 4.0, 0, 0, 0, 0, 0, 1);
return 1;
}
Why did you create a new string for nothing?
Re: What's the problem? -
Konstantinos - 02.11.2017
You cannot terminate an
if statement with a semicolon.
You forgot to open a parentheses.
Equal sign for checking is double.
It would have to be either:
pawn Код:
if (weaponid == 23)
ApplyPlayerAnimation(playerid, "COLT45", "COLT45_RELOAD", 4.0, 0, 0, 0, 0, 0, 1);
for 1 function call or a group (for more):
pawn Код:
if (weaponid == 23)
{
ApplyPlayerAnimation(playerid, "COLT45", "COLT45_RELOAD", 4.0, 0, 0, 0, 0, 0, 1);
}
Re: What's the problem? -
reddoxx - 02.11.2017
Ohh, thanks Konstantinos