#1

When I try to compile this: http://pastebin.com/8pvhaWJs I get this error:
Код:
C:\Users\User\Documents\Desktop\Test.pwn(10) : error 010: invalid function or declaration
What's up with it?
Reply
#2

Is that fullcode? if yes why you using playerid globally?
Reply
#3

You need to create the textdraw under OnPlayerConnect(playerid) callback. You just have it outside like that, it would surely give errors.
Reply
#4

PHP код:
#define FILTERSCRIPT
#include <a_samp>
#include <zcmd>
#if defined FILTERSCRIPT
new PlayerText:Crosshair[MAX_PLAYERS];
public 
OnPlayerConnect(playerid){
    
Crosshair[playerid] = CreatePlayerTextDraw(playerid336.000030174.346618"X");
    
PlayerTextDrawLetterSize(playeridCrosshair[playerid], 0.2459980.987734);
    
PlayerTextDrawAlignment(playeridCrosshair[playerid], 1);
    
PlayerTextDrawColor(playeridCrosshair[playerid], -1);
    
PlayerTextDrawSetShadow(playeridCrosshair[playerid], 0);
    
PlayerTextDrawSetOutline(playeridCrosshair[playerid], 0);
    
PlayerTextDrawBackgroundColor(playeridCrosshair[playerid], 51);
    
PlayerTextDrawFont(playeridCrosshair[playerid], 2);
    
PlayerTextDrawSetProportional(playeridCrosshair[playerid], 1);
    return 
1;
}
forward RemoveCrosshair(playerid);
public 
RemoveCrosshair(playerid)
{
    
PlayerTextDrawHide(playeridCrosshair[playerid]);
}
public 
OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart)
{
    
PlayerTextDrawShow(playeridCrosshair[playerid]);
    
SetTimer("RemoveCrosshair"500false);
    return 
1;
}
#endif 
Reply
#5

Quote:
Originally Posted by Sjn
Посмотреть сообщение
You need to create the textdraw under OnPlayerConnect(playerid) callback. You just have it outside like that, it would surely give errors.
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)