Jump to content
  • 0

Am nevoie urgenta de ajutor!


alexandruo9

Question

Problema intalnita (descriere):Asi dori daca puteti sa ma ajutati cu un gps pentru playeri adica asi dori ca politiei sa le apara un checkpoint unde este suspectul. Multumesc
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul(obligatoriu):Am gasit ceva pe net dar da erori 
Imagini / Video (optional):
Ati incercat sa rezolvati singur?:Am incercat am cautat dar nu am gasit si sunt cam incepator.

 

 

 

Asta am gasit pe net dar am errori

#include <a_samp>
forward timer();
#if defined FILTERSCRIPT
#define FILTERSCRIPT
public OnPlayerCommandText(playerid, cmdtext[])
{
  new cmd[256], tmp[256], string[256], idx, giveplayerid;
	if(strcmp(cmd, "/gps", true) == 0)
	{
	  new Float:x, Float:y, Float:z;
	  GetPlayerPos(giveplayerid, x, y, z);
 		tmp = strtok(cmdtext, idx);
	  if(!strlen(tmp))
		{
			SendClientMessage(playerid,0xFFFF00AA,"Usage: /gps [playerid]");
		 	return 1;
		}
		giveplayerid = ReturnUser(tmp);
		if(IsPlayerConnected(giveplayerid))
		{
		new Name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, Name, sizeof(Name));
		format(string, sizeof(string), "%s launched in the wake of GPS to find you!'", Name);
		SendClientMessage(giveplayerid, 0xFFFF00AA, string);
		SendClientMessage(playerid, 0xFFFF00AA, "Coords : %f,%f,%f, Checkpoint created!Go to player!");
		SetTimer("message",1000,false);
		SetPlayerCheckpoint(playerid, x, y, z);
		} else SendClientMessage(playerid, 0xFFFF00AA, "Player is not connected.");
		return 1;
	}
	return 0;
}
public timer()
{
	new giveplayerid;
  new Float:x, Float:y, Float:z;
  GetPlayerPos(giveplayerid, x, y, z);
  SetPlayerCheckpoint(playerid, x, y, z);
	return 1;
}
#endif
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0

Erorile sunt astea(Am bagat scriptu in gm)

C:UsersAlexDesktopCGRPgamemodesCG-RP1.pwn(26103) : error 017: undefined symbol "playerid"
C:UsersAlexDesktopCGRPgamemodesCG-RP1.pwn(73532) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Randurile sunt astea

public timp()
{
	new giveplayerid;
  new Float:x, Float:y, Float:z;
  GetPlayerPos(giveplayerid, x, y, z);
  SetPlayerCheckpoint(playerid, x, y, z);
	return 1;
}

Si Asta...

if(strcmp(cmd, "/localizare", true) == 0)
	{
	  new Float:x, Float:y, Float:z;
	  GetPlayerPos(giveplayerid, x, y, z);
 		tmp = strtok(cmdtext, idx);
	  if(!strlen(tmp))
		{
			SendClientMessage(playerid,0xFFFF00AA,"Usage: /gps [playerid]");
		 	return 1;
		}
		giveplayerid = ReturnUser(tmp);
		if(IsPlayerConnected(giveplayerid))
		{
		new Name[MAX_PLAYER_NAME];
		GetPlayerName(playerid, Name, sizeof(Name));
		format(string, sizeof(string), "%s launched in the wake of GPS to find you!'", Name);
		SendClientMessage(giveplayerid, 0xFFFF00AA, string);
		SendClientMessage(playerid, 0xFFFF00AA, "Coords : %f,%f,%f, Checkpoint created!Go to player!");
		SetTimer("message",1000,false);
		SetPlayerCheckpoint(playerid, x, y, z);
		} else SendClientMessage(playerid, 0xFFFF00AA, "Player is not connected.");
		return 1;
	}
Link to comment
Share on other sites

  • 0
Nu e definit size :( Ce sa fac va rog mult. Multumesc
C:UsersAlexDesktopCGRPgamemodesCG-RP1.pwn(26103) : error 017: undefined symbol "size"
C:UsersAlexDesktopCGRPgamemodesCG-RP1.pwn(73532) : error 017: undefined symbol "size"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

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.