31.05.2015, 19:07
PHP код:
public OnPlayerConnect(playerid)
{
EnablePlayerCameraTarget(playerid, 1);
return 1;
}
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
new MSG2[25];
format(MSG2, sizeof(MSG2), "%s", PlayerName(GetPlayerCameraTargetPlayer(playerid)));
GameTextForPlayer(playerid, MSG2, 500, 3);
return 1;
}
CMD:test(playerid, params[])
{
new MSG2[25];
new TargetID=GetPlayerCameraTargetPlayer(playerid);
new ObjectID=GetPlayerCameraTargetObject(playerid);
sscanf(params, "u", playerid);
format(MSG2, sizeof(MSG2), "%i", TargetID);
SendClientMessage(playerid, -1, MSG2);
format(MSG2, sizeof(MSG2), "%i", ObjectID);
SendClientMessage(playerid, -1, MSG2);
}
Am I doing it wrong?
This is just a test command..