OnPlayerDeath [help] Drop Object
#1

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);
Reply
#2

I'm 99% it'll work if you put it in OnPlayerDeath
Reply
#3

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.
Reply
#4

help please?
Reply
#5

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);
Reply
#6

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
Reply
#7

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.
Reply
#8

[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?
Reply
#9

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)
	{
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)