17.08.2011, 13:54
Hi guys, im using my own script to make some cool things.
I do not know if this is posible or not. Here is the thing:
Im trying using GetPlayerMoney Function to find out how much money has the player1 and his money goes to player2. Now, here is the problem; I do not know how to use this function.
I ******d it, Wiki-Searched and... nothing.
So I would like you to help me if you can.
If you dont understand me, just look at the script
And i got those errors:
Here is some pictures so you can see what is which line:
Possible or not?
I do not know if this is posible or not. Here is the thing:
Im trying using GetPlayerMoney Function to find out how much money has the player1 and his money goes to player2. Now, here is the problem; I do not know how to use this function.
I ******d it, Wiki-Searched and... nothing.
So I would like you to help me if you can.
If you dont understand me, just look at the script
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
new killer[129],killed[129];
new Float:money;
GetPlayerName(killerid,killer,sizeof(killer));
GetPlayerName(playerid,killed,sizeof(killed));
GetPlayerMoney(playerid,money);
if(IsInMini[playerid] == 1)
{
new killmsg[129];
new paremsg[129];
format(killmsg,sizeof(killmsg),"{008080} %s je ubio %s dvoboju,",killer,killed);
SendClientMessageToAll(0xFFF000FF,killmsg);
format(paremsg,sizeof(paremsg),"{008080} te uzeo njegovihg {009400} %s {008080}.",money);
SendClientMessageToAll(0xFFF000FF,paremsg);
GivePlayerMoney(killerid,money);
GivePlayerMoney(killed,-money);
IsInMini[killer] = 0;
SetPlayerVirtualWorld(killer,0);
IsInMini[killed] = 0;
SetPlayerVirtualWorld(killed,0);
}
return 1;
}
Код:
C:\Users\Nikola\Desktop\H\gamemodes\G.pwn(617) : warning 202: number of arguments does not match definition C:\Users\Nikola\Desktop\H\gamemodes\G.pwn(626) : warning 213: tag mismatch C:\Users\Nikola\Desktop\H\gamemodes\G.pwn(627) : error 035: argument type mismatch (argument 1) C:\Users\Nikola\Desktop\H\gamemodes\G.pwn(628) : error 033: array must be indexed (variable "killer") C:\Users\Nikola\Desktop\H\gamemodes\G.pwn(629) : error 035: argument type mismatch (argument 1) C:\Users\Nikola\Desktop\H\gamemodes\G.pwn(630) : error 033: array must be indexed (variable "killed") C:\Users\Nikola\Desktop\H\gamemodes\G.pwn(631) : error 035: argument type mismatch (argument 1)
Possible or not?