SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 09/09/2010, 12:46 PM   #1
LifeStyle
Big Clucker
 
Join Date: Jul 2010
Posts: 94
Reputation: 0
Default Sending name problem

It's not sending any name that has the most kills.
pawn Code:
forward TimeUp(playerid,notify);
public TimeUp(playerid,notify)
{
    new player;
    if(notify == 1)
    {
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(gKills[i] > gKills[playerid]) player = i;
    }
    GetPlayerName(player, gPlayerName, sizeof(gPlayerName));
    format(str, sizeof(str), "%s has won the match with the most kills.",player);
    Sendclientmessagetoall..........
        }
    return 1;
}
__________________
LifeStyle is offline  
Old 09/09/2010, 12:58 PM   #2
Mauzen
High-roller
 
Mauzen's Avatar
 
Join Date: Jun 2007
Location: Western Germany
Posts: 4,164
Reputation: 1040
Default Re: Sending name problem

You put the name into gPlayerName and then try to read it from player. You also need to use gPlayerName in the format

pawn Code:
GetPlayerName(player, gPlayerName, sizeof(gPlayerName));
format(str, sizeof(str), "%s has won the match with the most kills.",gPlayerName);
Mauzen is online now  
Old 09/09/2010, 01:04 PM   #3
LifeStyle
Big Clucker
 
Join Date: Jul 2010
Posts: 94
Reputation: 0
Default Re: Sending name problem

Ofcourse, fail xd
__________________
LifeStyle is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with sending rcon commands... hazdog Help Archive 16 04/01/2011 07:30 PM
Sending Message Alex_Valde Help Archive 4 01/09/2010 06:03 PM
kill streak sending message sending wrong Andy_McKinley Help Archive 0 08/07/2010 12:40 PM
Sending one message instead of 2 Perker12345 Help Archive 4 11/01/2010 01:00 PM
Have problem with sending message NickName3 Help Archive 1 14/10/2009 01:54 PM


All times are GMT. The time now is 03:55 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.