Help! DEATH POSITION. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help! DEATH POSITION. (
/showthread.php?tid=504443)
Help! DEATH POSITION. -
Jyxtr0 - 04.04.2014
I want that when a player dies, a message says where he died.
I've made this:
http://pastebin.com/CuaWhFgG
But it returns me 3 warnings:
Код:
C:\Users\Jyxtro\Desktop\sampserver\gamemodes\jyxtro.pwn(91) : warning 202: number of arguments does not match definition
C:\Users\Jyxtro\Desktop\sampserver\gamemodes\jyxtro.pwn(91) : warning 202: number of arguments does not match definition
C:\Users\Jyxtro\Desktop\sampserver\gamemodes\jyxtro.pwn(91) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.
Please, explain me how to fix.
I want to learn, thank you.
(sorry for bad english, i'm italian)
Re: Help! DEATH POSITION. -
EiresJason - 04.04.2014
You need to format the message first so you can input the values into the string and then send the string.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new Float:X,
Float:Y,
Float:Z,
string[60];
GetPlayerPos(playerid,X,Y,Z);
format(string,sizeof(string),"Un tizio и morto a %f %f &f!", X, Y, Z);
SendClientMessage(playerid,0xFFFFFF,string);
return 1;
}
Re: Help! DEATH POSITION. -
Jyxtr0 - 04.04.2014
It sends to me X and Y coordinates, but for the Z it says %f!
EDIT: Found the problem, it was &f and not %f.
Thank you!