OnPlayerDeath [help] Drop Object -
Karl1195 - 25.12.2010
Well hey guys i am scripting some basic stuff and i am not sure if this is right. Well i want that when a player dies he drop a dead cop object is this script good?
Код:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
CreateObject(3092, X, Y, Z, 0.0, 0.0, 0.0, 100.0);
Re: OnPlayerDeath [help] Drop Object -
Geso - 25.12.2010
I'm 99% it'll work if you put it in OnPlayerDeath
Re: OnPlayerDeath [help] Drop Object -
Karl1195 - 25.12.2010
Quote:
Originally Posted by Geso
I'm 99% it'll work if you put it in OnPlayerDeath
|
Код:
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1580) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1580) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1580) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1581) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 213: tag mismatch
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 213: tag mismatch
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 213: tag mismatch
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1580) : warning 203: symbol is never used: "Z"
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1580) : warning 203: symbol is never used: "Y"
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1580) : warning 203: symbol is never used: "X"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: OnPlayerDeath [help] Drop Object -
Karl1195 - 25.12.2010
help please?
Re: OnPlayerDeath [help] Drop Object -
Mean - 25.12.2010
pawn Код:
CreateObject(modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ);
You got a mismatch, so you're doin' something wrong with this ^^
pawn Код:
CreateObject(3092, X, Y, Z, 0.0, 0.0, 0.0);
Re: OnPlayerDeath [help] Drop Object -
Karl1195 - 26.12.2010
Some how this got duble i am sure it's not from my side since this forum got wait 120 seconds or how much to repost
Re: OnPlayerDeath [help] Drop Object -
Karl1195 - 26.12.2010
Lines:
Код:
new Float:X, Float:Y, Float:Z; [LINE 1582]
GetPlayerPos(playerid, X, Y, Z);[LINE 1583]
CreateObject(3092, X, Y, Z, 0.0, 0.0, 0.0);[LINE 1584]
Error/Warnings:
Код:
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 219: local variable "Z" shadows a variable at a preceding level
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1583) : error 035: argument type mismatch (argument 2)
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1584) : warning 213: tag mismatch
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1584) : warning 213: tag mismatch
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1584) : warning 213: tag mismatch
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 203: symbol is never used: "Z"
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 203: symbol is never used: "Y"
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 203: symbol is never used: "X"
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(5794) : warning 203: symbol is never used: "Float"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
Re: OnPlayerDeath [help] Drop Object -
Haydz - 26.12.2010
[QUOTE=Karl1195;978936]
Lines:
Код:
new Float:X, Float:Y, Float:Z; [LINE 1582]
GetPlayerPos(playerid, X, Y, Z);[LINE 1583]
CreateObject(3092, X, Y, Z, 0.0, 0.0, 0.0);[LINE 1584]
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateObject(3092,x, y, z, 0.0, 0.0, 0.0);
This works on my server, do you have any other float

etc under OnPlayerDeath?
Re: OnPlayerDeath [help] Drop Object -
Karl1195 - 26.12.2010
Let me see:
EDIT:
YES:
Код:
new LastWeapon, KillerWeapon, Float:Pos[3];
PlayerInfo[playerid][Spawned] = 0;
LastWeapon = GetPlayerWeapon(playerid);
KillerWeapon = GetPlayerWeapon(killerid);
PlayerInfo[playerid][IsShot] = 0;
if(LastWeapon != 0)
{
Re: OnPlayerDeath [help] Drop Object -
Haydz - 26.12.2010
You will need to change 1 of the floats then
thats whats causing most of the warnings.
these warnings mean you have two of the same type of varabiles, e.g 2 floats.
pawn Код:
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 219: local variable "X" shadows a variable at a preceding level
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 219: local variable "Y" shadows a variable at a preceding level
C:\Documents and Settings\Karl\Desktop\Mirage Gaming Roleplay\gamemodes\MRP.pwn(1582) : warning 219: local variable "Z" shadows a variable at a preceding level