[Help]: Derby Event System
#10

Another problem

When I type /winner [playerid], then it's pop up the game text without a name and winner don't get any score or money.

I have this stock:

PHP код:
stock GetName(playerid)
{
new
name[24];
GetPlayerName(playeridnamesizeof(name));
return 
name;

Code:

PHP код:
CMD:winner(playeridparams[])
{
    new 
string[200];
    new 
targetid;
    if(
gPlayerInfo[playerid][PLAYER_LEVEL] < 1) return SendClientMessage(playeridCOLOR_RED"You are Not Allowed To Use This Command!");
    if(
gPlayerInfo[playerid][PLAYER_JAILED] == 1)return SendClientMessage(playeridCOLOR_RED"ERROR: You Cannot Use Any Command When You're Jailed!");
    if(
sscanf(params"s"targetid)) return SendClientMessage(playeridCOLOR_ORANGE"Usage: /winner [playerid]");
    
format(stringsizeof(string), "~w~Derby event has ~g~FINISHED~W~! Congratz to~g~ %s ~w~, he earned ~g~$30000 cash ~w~and ~g~30 scores!"GetName(targetid));
    
GameTextForAll(string,5000,3);
    
SetPlayerScore(playeridGetPlayerScore(playerid) + 30);
    
GivePlayerMoney(targetid30000);
    return 
1;

Reply


Messages In This Thread
[Help]: Derby Event System - by Areax - 04.05.2013, 11:49
Re: [Help]: Derby Event System - by Areax - 04.05.2013, 12:31
Re: [Help]: Derby Event System - by RajatPawar - 04.05.2013, 12:33
Re: [Help]: Derby Event System - by Areax - 04.05.2013, 12:41
Re: [Help]: Derby Event System - by zxc1 - 04.05.2013, 12:50
Re: [Help]: Derby Event System - by RajatPawar - 04.05.2013, 12:53
Re: [Help]: Derby Event System - by Areax - 04.05.2013, 13:02
Re: [Help]: Derby Event System - by RajatPawar - 04.05.2013, 13:04
Re: [Help]: Derby Event System - by Areax - 04.05.2013, 13:06
Re: [Help]: Derby Event System - by Areax - 04.05.2013, 13:57

Forum Jump:


Users browsing this thread: 2 Guest(s)