EnablePlayerCameraTarget INVALID_PLAYER_ID
#1

PHP код:

public OnPlayerConnect(playerid)
{
     
EnablePlayerCameraTarget(playerid1);
     return 
1;
}
public 
OnPlayerWeaponShot(playeridweaponidhittypehitidFloat:fXFloat:fYFloat:fZ)
{
    new 
MSG2[25];
    
format(MSG2sizeof(MSG2), "%s"PlayerName(GetPlayerCameraTargetPlayer(playerid)));
    
GameTextForPlayer(playeridMSG25003);
    return 
1;
}
CMD:test(playeridparams[])
{
    new 
MSG2[25];
    new 
TargetID=GetPlayerCameraTargetPlayer(playerid);
    new 
ObjectID=GetPlayerCameraTargetObject(playerid);
    
sscanf(params"u"playerid);
    
format(MSG2sizeof(MSG2), "%i"TargetID);
    
SendClientMessage(playerid, -1MSG2);
    
format(MSG2sizeof(MSG2), "%i"ObjectID);
    
SendClientMessage(playerid, -1MSG2);

It gives me Invalid PlayerID even when I am near someone.. Like close to his nose.. Or away like 1m..
Am I doing it wrong?
This is just a test command..
Reply


Messages In This Thread
EnablePlayerCameraTarget INVALID_PLAYER_ID - by Mic_H - 31.05.2015, 19:07
Re: EnablePlayerCameraTarget INVALID_PLAYER_ID - by Abagail - 31.05.2015, 19:16
Re: EnablePlayerCameraTarget INVALID_PLAYER_ID - by Mic_H - 01.06.2015, 13:29
AW: EnablePlayerCameraTarget INVALID_PLAYER_ID - by Kaliber - 01.06.2015, 13:31

Forum Jump:


Users browsing this thread: 2 Guest(s)