Jump to content
  • 0

Problema Radar


Daniel_Dani

Question

22 answers to this question

Recommended Posts

Pai adauga in fata fiecare comenzi

if(PlayerInfo[playerid][pMember] == ID FACTIUNE || PlayerInfo[playerid][pLeader] == ID FACTIUNE)
{
Si pe la finalul comenzii
else
{
SendClientMessage(playerid, COLOR_WHITE, "Ne pare rau dar nu faci parte din NUMELE FACTIUNII CARE VREI TU SA FIE AICI
}
}

<a href="http://www.userbars.be"><img src="http://img534.imageshack.us/img534/9098/36589.gif" alt="Free userbars" border="0"></a>

Link to comment
Share on other sites

Doar la asta doresc sa adaug

[pawn]public OnPlayerCommandText (playerid, cmdtext[])

{

if (!strcmp (cmdtext, "/placeradar"))

{

if (IsPlayerInAnyVehicle (playerid))

{

    new vehid = GetPlayerVehicleID (playerid);

    if (VehRadarID [vehid] > -1) return 1;

            new Float: x, Float: y, Float: z, Float: a;

    GetVehiclePos (vehid, x, y, z);

    GetVehicleZAngle (vehid, a);

    SendClientMessage (playerid, COLOR_YELLOW, "Radar has been added successfully.");

    VehRadarID [vehid] = CreateObject (367, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 300.0);

    AttachObjectToVehicle (VehRadarID [vehid], vehid, 0.2, 0.50, 0.3, 0.0, 0.0, 90.0);

    for (new i = 0; i < MAX_PLAYERS; i++)

    {

        if (IsPlayerInVehicle (i, vehid))

        {

          TextDrawShowForPlayer (i, RadarHud);

}

    }

  }

return 1;

}[/pawn]

Cand incerc imi da don't send de la pawno.Spec ca ma poti ajuta.

Multumesc pentru bunavointa

vqqi6h.gif
Link to comment
Share on other sites

EDIT: Tine-o

if (!strcmp (cmdtext, "/placeradar"))
	{
		if (IsPlayerInAnyVehicle (playerid))
		{
		if(PlayerInfo[playerid][pMember] == IDFACTIUNE || PlayerInfo[playerid][pLeader] == IDFACTIUNE)	    
		{
new vehid = GetPlayerVehicleID (playerid);
		    if (VehRadarID [vehid] > -1) return 1;

            new Float: x, Float: y, Float: z, Float: a;
		    GetVehiclePos (vehid, x, y, z);
		    GetVehicleZAngle (vehid, a);
		    SendClientMessage (playerid, COLOR_YELLOW, "Radar has been added successfully.");
		    VehRadarID [vehid] = CreateObject (367, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 300.0);
		    AttachObjectToVehicle (VehRadarID [vehid], vehid, 0.2, 0.50, 0.3, 0.0, 0.0, 90.0);

		    for (new i = 0; i < MAX_PLAYERS; i++)
		    {
		        if (IsPlayerInVehicle (i, vehid))
		        {
          			TextDrawShowForPlayer (i, RadarHud);
				}
		    }
	}		
else
{
SendClientMessage(playerid, COLOR_WHITE,"Ne pare rau dar nu faci parte din factiunea ....");
}  		
}

<a href="http://www.userbars.be"><img src="http://img534.imageshack.us/img534/9098/36589.gif" alt="Free userbars" border="0"></a>

Link to comment
Share on other sites

Incearc-o si asa, e cel mai corect.

if (!strcmp (cmdtext, "/placeradar"))
	{
		if (IsPlayerInAnyVehicle (playerid))
		{
		if(PlayerInfo[playerid][pMember] == IDFACTIUNE || PlayerInfo[playerid][pLeader] == IDFACTIUNE)	    
		new vehid = GetPlayerVehicleID (playerid);
		    if (VehRadarID [vehid] > -1) return 1;

            new Float: x, Float: y, Float: z, Float: a;
		    GetVehiclePos (vehid, x, y, z);
		    GetVehicleZAngle (vehid, a);
		    SendClientMessage (playerid, COLOR_YELLOW, "Radar has been added successfully.");
		    VehRadarID [vehid] = CreateObject (367, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 300.0);
		    AttachObjectToVehicle (VehRadarID [vehid], vehid, 0.2, 0.50, 0.3, 0.0, 0.0, 90.0);

		    for (new i = 0; i < MAX_PLAYERS; i++)
		    {
		        if (IsPlayerInVehicle (i, vehid))
		        {
          			TextDrawShowForPlayer (i, RadarHud);
				}
		    }
	}		
}
else
{
SendClientMessage(playerid, COLOR_WHITE,"Ne pare rau dar nu faci parte din factiunea ....");
}  		

<a href="http://www.userbars.be"><img src="http://img534.imageshack.us/img534/9098/36589.gif" alt="Free userbars" border="0"></a>

Link to comment
Share on other sites

:)))) Pai de ce n-ai spus ca e FilterScript ma. Ia comanda si bag-o in GameMode dincolo de comanda /pay si fa-o de forma if(strcmp(cmd, "/placeradar", true) == 0)

Oricum solutia ti-am dat-o modifica acolo ID FACTIUNE cu ID-ul factiunii careia vrei sa execute comanda.

<a href="http://www.userbars.be"><img src="http://img534.imageshack.us/img534/9098/36589.gif" alt="Free userbars" border="0"></a>

Link to comment
Share on other sites

Am incercat sa pun si imi da erorile

[pawn]C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21534) : error 003: declaration of a local variable must appear in a compound block

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21534) : error 017: undefined symbol "vehid"

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21535) : error 017: undefined symbol "VehRadarID"

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21535) : error 017: undefined symbol "vehid"

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21535) : error 029: invalid expression, assumed zero

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21535) : fatal error 107: too many error messages on one line[/pawn]

vqqi6h.gif
Link to comment
Share on other sites

Am scris-o asa:

[pawn] if(strcmp(cmd, "/placeradar", true) == 0)

{

if (IsPlayerInAnyVehicle (playerid))

{

if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)

new CarID = GetPlayerVehicleID (playerid);

    if (VehRadarID [CarID] > -1) return 1;

            new Float: x, Float: y, Float: z, Float: a;

    GetVehiclePos (CarID, x, y, z);

    GetVehicleZAngle (CarID, a);

    SendClientMessage (playerid, COLOR_YELLOW, "Radar has been added successfully.");

    VehRadarID [CarID] = CreateObject (367, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 300.0);

    AttachObjectToVehicle (VehRadarID [CarID], CarID, 0.2, 0.50, 0.3, 0.0, 0.0, 90.0);

    for (new i = 0; i < MAX_PLAYERS; i++)

    {

        if (IsPlayerInVehicle (i, CarID))

        {

          TextDrawShowForPlayer (i, RadarHud);

}

    }

}

}

else

{

SendClientMessage(playerid, COLOR_WHITE,"Ne pare rau dar nu faci parte din factiunea ....");

}[/pawn]

Si zice:

[pawn]C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21538) : error 003: declaration of a local variable must appear in a compound block

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21538) : error 033: array must be indexed (variable "CarID")

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21539) : error 033: array must be indexed (variable "CarID")

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21542) : error 035: argument type mismatch (argument 1)

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21543) : error 035: argument type mismatch (argument 1)

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21545) : error 033: array must be indexed (variable "CarID")

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21546) : error 033: array must be indexed (variable "CarID")

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(21550) : error 035: argument type mismatch (argument 2)[/pawn]

Am pus comanda sub /pay cum mi-ai spus :D

vqqi6h.gif
Link to comment
Share on other sites

[pawn]

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2485) : error 004: function "SafeGivePlayerMoney" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2514) : error 004: function "SafeGivePlayerMoney" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2550) : error 004: function "SafeResetPlayerWeapons" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2551) : error 004: function "SafeGivePlayerWeapon" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2578) : error 004: function "SafeResetPlayerWeapons" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2918) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2929) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2941) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2945) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2957) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2961) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2965) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2969) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2973) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2977) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2981) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2985) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(2997) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(3001) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(3005) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(3009) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(3013) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(3025) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(3029) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(3033) : error 004: function "PlayerToPoint" is not implemented

C:\Documents and Settings\Dani\Desktop\Urban Life 10\gamemodes\ULRP.pwn(3045) : error 004: function "PlayerToPoint" is not implemented[/pawn]

Off...

Nu ar fi mai usor sa pun comanda pentru anumite skinuri si acelea sa fie skinurile de la Factiune Respectiva?

vqqi6h.gif
Link to comment
Share on other sites

MA DECI, bagi comanda asta in GM ;

	if(strcmp(cmd, "/placeradar", true) == 0)
	{
		if (IsPlayerInAnyVehicle (playerid))
		{
		if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
		{
		new CarID = GetPlayerVehicleID (playerid);
		    if (VehRadarID [CarID] > -1) return 1;

            new Float: x, Float: y, Float: z, Float: a;
		    GetVehiclePos (CarID, x, y, z);
		    GetVehicleZAngle (CarID, a);
		    SendClientMessage (playerid, COLOR_YELLOW, "Radar has been added successfully.");
		    VehRadarID [CarID] = CreateObject (367, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 300.0);
		    AttachObjectToVehicle (VehRadarID [CarID], CarID, 0.2, 0.50, 0.3, 0.0, 0.0, 90.0);

		    for (new i = 0; i < MAX_PLAYERS; i++)
		    {
		        if (IsPlayerInVehicle (i, CarID))
		        {
          			TextDrawShowForPlayer (i, RadarHud);
				}
		    }
	}
}
else
{
SendClientMessage(playerid, COLOR_WHITE,"Ne pare rau dar nu faci parte din factiunea ....");
}
return 1;
}
Si pe la inceputul modului defineste
new VehRadarID[MAX_PLAYERS];
new Text:RadarHud;

Acum am facut eu la mine in PC Special si merge, fa cum am zis in POSTUL ASTA

<a href="http://www.userbars.be"><img src="http://img534.imageshack.us/img534/9098/36589.gif" alt="Free userbars" border="0"></a>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.