problem with /show und /sannehmen, /aannehmen, /..annehmen
#1

Hey,

I have a problem with this commands, if my friend take /show [id] and i drive to him, the marker delete if i was in him near
but i dont can see him why
pls help me
sry for bad english
Код:
if(strcmp(cmd, "/show", true) == 0)
	{
		if(IsPlayerConnected(playerid))
		{
			if(!strlen(cmdtext[6]))
			{
				for(new i=0; i<MAX_PLAYERS; i++)
				{
					if(IsPlayerConnected(i))
					{
						SFM(i,COLOR_YELLOW," %s Ist nun fьr Alle Sichtbar",PlayerName(playerid));
						HatShow[i]=1;
						SetPlayerColor(playerid,COLOR_ASKQ);
					}
				}
			}
			else
			{
				new id=strval(cmdtext[6]);
				if(IsPlayerConnected(id))
				{
					SFM(id,COLOR_YELLOW," %s Ist nun fьr dich Sichtbar",PlayerName(playerid));
					SetPlayerMarkerForPlayer(id,playerid,COLOR_ASKQ);
					SFM(playerid,COLOR_YELLOW,"Du bist nun fьr %s sichtbar",PlayerName(id));
					HatShow[playerid]=1;
				}
			}
		}
		return 1;
	}
Код:
if(strcmp(cmd, "/sannehmen", true) == 0)
	{
	  if(Account[playerid][Sani] == 1 || Account[playerid][Sani] == 2 || Account[playerid][Sani] == 3)
		{
		  if(IsPlayerConnected(playerid))
		  {
				tmp = strtok(cmdtext, idx);
				if(!strlen(tmp))
				{
					SCM(playerid, COLOR_RED, "Hilfe: /sannehmen [playerID]");
					return 1;
				}
				giveplayerid = ReturnUser(tmp);
				if (IsPlayerConnected(giveplayerid))
				{
				  if(giveplayerid != INVALID_PLAYER_ID)
				  {
						if(Notruf[giveplayerid] == 2)
						{
							GetPlayerName(playerid,playername,sizeof(playername));
					    GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
							SetPlayerMarkerForPlayer(playerid,giveplayerid,COLOR_ORANGE);
							SetPlayerMarkerForPlayer(giveplayerid,playerid,COLOR_ORANGE);
							SCM(playerid, COLOR_ORANGE, "Du hast nun den Auftrag angenomen");
							SCM(giveplayerid, COLOR_ORANGE, "Ein Sanitдter hat den Auftrag angenommen");
							new i=0;
							for(; i < MAX_PLAYERS; i++)
							{
				  			if (Account[i][Sani] == 1 || Account[i][Sani] == 2 || Account[i][Sani] == 3)
								{
									SFM(i,COLOR_LIGHTBLUE,"Sanitдter %s hat den Aufrag von %s(playerid:%d) angenommen",playername,giveplayer,giveplayerid);
				  			}
							}
						}
						else
						{
							SCM(playerid, COLOR_RED, "Dieser Spieler hat keinen Notruf gesendet");
						}
					}
				}
				else
				{
					SCM(playerid, COLOR_RED, "Dieser Spieler ist offline");
				}
			}
		}
		else
 		{
 			SCM(playerid, COLOR_GREY, "Du bist kein Sanitдter!");
	    return 1;
	  }
		return 1;
	}
- Dedi
Reply
#2

push
Reply
#3

push
Reply
#4

noone can help??
Reply
#5

Quote:
Originally Posted by Dedi
noone can help??
None can understand.
Reply
#6

a user make /show 3 and I can see him on the map
i drive to him and are 3 blocks away and than the marker go away
Reply
#7

I know u are german xD...
Schau mal im Script nach wo alles SetPlayerMarkerForPlayer auf 0 ist, da es dann deaktiviert die anzeige
Reply
#8

English:
SetPlayerMarkerForPlayer never set to 0

German:
SetPlayerMarkerForPlayer habe ich nirgendswo im script auf 0 gesetzt
Reply
#9

help pls
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)