public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid) { if(weaponid == SLAP_GUN && issuerid == DildoSlapper) { GameTextForPlayer(playerid, "~r~DEAD~w~!", 3000, 5); GameTextForPlayer(playerid, "~g~KILLED~w~!", 3000, 5); Dead[playerid] = true; currDead++; TogglePlayerSpectating(playerid, true); PlayerSpectatePlayer(playerid, issuerid, SPECTATE_MODE_NORMAL); if(currDead == (FixPlayers() - 1)) { EndGame(); } } return; } |
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
new Float:Pos[3];
if(weaponid == SLAP_GUN && issuerid == DildoSlapper)
{
GameTextForPlayer(playerid, "~r~DEAD~w~!", 3000, 5);
GameTextForPlayer(playerid, "~g~KILLED~w~!", 3000, 5);
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
CreateActor(250, Pos[0], Pos[1], Pos[2], 0.0);
Dead[playerid] = true;
currDead++;
TogglePlayerSpectating(playerid, true);
PlayerSpectatePlayer(playerid, issuerid, SPECTATE_MODE_NORMAL);
if(currDead == (FixPlayers() - 1))
{
EndGame();
}
}
return;
}
new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); CreateActor(skinid, x, y, z);
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid) { new Float:Pos[3]; if(weaponid == SLAP_GUN && issuerid == DildoSlapper) { GameTextForPlayer(playerid, "~r~DEAD~w~!", 3000, 5); GameTextForPlayer(playerid, "~g~KILLED~w~!", 3000, 5); GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); CreateActor(296, Pos[0], Pos[1], Pos[2], 0.0); ApplyActorAnimation(296, "WUZI", "CS_Dead_Guy",1.0, 0, 1, 1, 1, 0); Dead[playerid] = true; currDead++; TogglePlayerSpectating(playerid, true); PlayerSpectatePlayer(playerid, issuerid, SPECTATE_MODE_NORMAL); if(currDead == (FixPlayers() - 1)) { EndGame(); } } return; } |
Rep'd both of you, thanks for the help. By the way, would this work since I want to add an animation?
|
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid) { new Float:Pos[3]; if(weaponid == SLAP_GUN && issuerid == DildoSlapper) { GameTextForPlayer(playerid, "~r~DEAD~w~!", 3000, 5); GameTextForPlayer(playerid, "~g~KILLED~w~!", 3000, 5); GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); CreateActor(296, Pos[0], Pos[1], Pos[2], 0.0); ApplyActorAnimation(MyActor, "WUZI", "CS_Dead_Guy",1.0, 0, 1, 1, 1, 0); Dead[playerid] = true; currDead++; TogglePlayerSpectating(playerid, true); PlayerSpectatePlayer(playerid, issuerid, SPECTATE_MODE_NORMAL); if(currDead == (FixPlayers() - 1)) { EndGame(); } } return; }
[HTML]public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
That doesn't work sadly |
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
new Float:Pos[3];
if(weaponid == SLAP_GUN && issuerid == DildoSlapper)
{
GameTextForPlayer(playerid, "~r~DEAD~w~!", 3000, 5);
GameTextForPlayer(playerid, "~g~KILLED~w~!", 3000, 5);
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
pActor[playerid] = CreateActor(296, Pos[0], Pos[1], Pos[2], 0.0);
ApplyActorAnimation(pActor[playerid], "WUZI", "CS_Dead_Guy",1.0, 0, 1, 1, 1, 0);
Dead[playerid] = true;
currDead++;
TogglePlayerSpectating(playerid, true);
PlayerSpectatePlayer(playerid, issuerid, SPECTATE_MODE_NORMAL);
if(currDead == (FixPlayers() - 1))
{
EndGame();
}
}
return;
}
C:\Users\Aoky\Desktop\dildo.pwn(219) : error 017: undefined symbol "pActor" C:\Users\Aoky\Desktop\dildo.pwn(219) : warning 215: expression has no effect C:\Users\Aoky\Desktop\dildo.pwn(219) : error 001: expected token: ";", but found "]" C:\Users\Aoky\Desktop\dildo.pwn(219) : error 029: invalid expression, assumed zero C:\Users\Aoky\Desktop\dildo.pwn(219) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid) { new Float:Pos[3]; if(weaponid == SLAP_GUN && issuerid == DildoSlapper) { GameTextForPlayer(playerid, "~r~DEAD~w~!", 3000, 5); GameTextForPlayer(playerid, "~g~KILLED~w~!", 3000, 5); GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]); pActor[playerid] = CreateActor(296, Pos[0], Pos[1], Pos[2], 0.0); ApplyActorAnimation(pActor[playerid], "WUZI", "CS_Dead_Guy",1.0, 0, 1, 1, 1, 0); Dead[playerid] = true; currDead++; TogglePlayerSpectating(playerid, true); PlayerSpectatePlayer(playerid, issuerid, SPECTATE_MODE_NORMAL); if(currDead == (FixPlayers() - 1)) { EndGame(); } } return; } |
new pActor[MAX_PLAYERS];