[HELP] SendClientMessage with string
#1

Yo all
i have a problem ! i want to put somthink like "(player) has turn to zombie"
this is my code & it wont work what'es tha problem plz help

Quote:

new Float:hp, Float:a;
new target = GetClosestPlayer(playerid);
if(GetDistanceBetweenPlayers(playerid,target) <= 1)
{
if(hp < 5)
{
new string[100];
new target[MAX_PLAYERS];
format(string,sizeof(string), "%s turn into a zombie !.", target);
SendClientMessageToAll(RED,string);
}
}

Reply
#2

pawn Код:
new Float:hp, Float:a;
new target = GetClosestPlayer(playerid);
if(GetDistanceBetweenPlayers(playerid,target) <= 1)
{
    if(hp < 5)
    {
        new string[100];
        new hPl[MAX_PLAYER_NAME];
        GetPlayerName(target, hPl, sizeof hPl);
        format(string,sizeof(string), "%s turn into a zombie !.", hPl);
        SendClientMessageToAll(RED,string);
    }
}
Reply
#3

pawn Код:
new Float:hp, Float:a;
new target = GetClosestPlayer(playerid);
if(GetDistanceBetweenPlayers(playerid,target) <= 1)
{
    if(hp < 5)
    {
        new string[100], targetname[28];
        GetPlayerName(playerid, targetname, sizeof(targetname));
        format(string,sizeof(string), "%s turn into a zombie !.", targetname);
        SendClientMessageToAll(RED,string);
    }
}
Next time use [ pawn ] [ /pawn ] tags please.

EDIT: Damnit, I was slow.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)