18.02.2010, 14:04
this is my code :
public OnPlayerDeath(playerid,killerid,reason)
{
new str[80],name[2][MAX_PLAYER_NAME];
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1);
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
GivePlayerMoney(killerid,13337);
SendDeathMessage(killerid, playerid, reason);
if(killerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid,name[0],MAX_PLAYER_NAME);
GetPlayerName(killerid,name[1],MAX_PLAYER_NAME);
format(str,sizeof(str),"%s has been killed by %s",name[0],name[1]);
SendClientMessage(playerid, 0xBB0000FF,str);
}
return 1;
}
In SendClientMessage when i change it to SendClientMessageToAll because i want everyone to see it, it gives me an error 035: argument type mismatch (argument 2)
please help me! , thank you
public OnPlayerDeath(playerid,killerid,reason)
{
new str[80],name[2][MAX_PLAYER_NAME];
SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid)+1);
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);
SetPlayerScore(playerid, GetPlayerScore(playerid)-1);
GivePlayerMoney(killerid,13337);
SendDeathMessage(killerid, playerid, reason);
if(killerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid,name[0],MAX_PLAYER_NAME);
GetPlayerName(killerid,name[1],MAX_PLAYER_NAME);
format(str,sizeof(str),"%s has been killed by %s",name[0],name[1]);
SendClientMessage(playerid, 0xBB0000FF,str);
}
return 1;
}
In SendClientMessage when i change it to SendClientMessageToAll because i want everyone to see it, it gives me an error 035: argument type mismatch (argument 2)
please help me! , thank you