15.12.2018, 01:20
Help me to make a COUNT of players that entered GAME / minigun I want to do it with textdraw example MINIGUN: 0 PLAYERS
new PlayersInMG = 0; // PlayersInMG will be your players count in minigun game and should be used in the textdraw
// In Command
CMD:minigun(playerid)
{
//When Player join minigun
PlayersInMG++; // This will increase count of the players who join the minigun game.
return 1;
}
//In exit Command
CMD:exitminigun(playerid)
{
//When player leave the minigun
PlayersInMG--; // This will decrease count of the players who join the minigun game.
return 1;
}
// You have to use PlayersInMG to Set the TextdrawString for Minigun players.
new Iterator:PlayerInMG<MAX_PLAYERS>;
// In Command
CMD:minigun(playerid)
{
//When Player join minigun
Iter_Add(PlayerInMG, playerid );
return 1;
}
//In exit Command
CMD:exitminigun(playerid)
{
//When player leave the minigun
Iter_Remove( PlayerInMG, playerid );
return 1;
}
// You have to use Iter_Count(PlayerInCNR); to Set the TextdrawString for Minigun players.
Textdraw1 = TextDrawCreate(503.000000, 113.000000, "--"); TextDrawBackgroundColor(Textdraw1, 65535); TextDrawFont(Textdraw1, 3); TextDrawLetterSize(Textdraw1, 0.390000, 1.000000); TextDrawColor(Textdraw1, -65281); TextDrawSetOutline(Textdraw1, 1); TextDrawSetProportional(Textdraw1, 1); |
public OnGamemodeInit()
{
Textdraw1 = TextDrawCreate(503.000000, 113.000000, "--");
TextDrawBackgroundColor(Textdraw1, 65535);
TextDrawFont(Textdraw1, 3);
TextDrawLetterSize(Textdraw1, 0.390000, 1.000000);
TextDrawColor(Textdraw1, -65281);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw1);
return 1;
}
Place the textdraw in OnGamemodeInit and show the textdraw in OnPlayerConnect.
|
C:\Users\Angga\Desktop\SAMP server\gamemodes\LAFR.pwn(134) : error 017: undefined symbol "Textdraw1"
C:\Users\Angga\Desktop\SAMP server\gamemodes\LAFR.pwn(135) : warning 217: loose indentation
C:\Users\Angga\Desktop\SAMP server\gamemodes\LAFR.pwn(135) : error 017: undefined symbol "Textdraw1"
C:\Users\Angga\Desktop\SAMP server\gamemodes\LAFR.pwn(136) : error 017: undefined symbol "Textdraw1"
C:\Users\Angga\Desktop\SAMP server\gamemodes\LAFR.pwn(137) : error 017: undefined symbol "Textdraw1"
C:\Users\Angga\Desktop\SAMP server\gamemodes\LAFR.pwn(138) : error 017: undefined symbol "Textdraw1"
C:\Users\Angga\Desktop\SAMP server\gamemodes\LAFR.pwn(139) : error 017: undefined symbol "Textdraw1"
C:\Users\Angga\Desktop\SAMP server\gamemodes\LAFR.pwn(140) : error 017: undefined symbol "Textdraw1"
C:\Users\Angga\Desktop\SAMP server\gamemodes\LAFR.pwn(144) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
}
error
pawn Код:
|
new Text:Textdraw1;
C:\Users\Angga\Desktop\SAMP server\gamemodes\LAFR.pwn(136) : warning 217: loose indentation C:\Users\Angga\Desktop\SAMP server\gamemodes\LAFR.pwn(143) : warning 217: loose indentation |