Jump to content
  • 0

pomoc Pozice


Hansa

Dotaz

forward kos(playerid);

 

public kos(playerid)
{
if (IsPlayerInRangeOfPoint(playerid,10,2277.4102,1941.3801,59.6232)){
	new string[128];
	format(string,sizeof(string),"%s dal kôš !!!",PlayerName(playerid));
	GameTextForAll(string,3000,3);
}
           return 1;
}

 

stock PlayerName(playerid) {
new name[255];
if (IsPlayerConnected(playerid)) {
GetPlayerName(playerid, name, MAX_PLAYERS_EX);
} else name[0]=0;
return name;
}

 

Prečo mi ten public nefunguje? V pawne nepíše chybu ale v hre nefunguje. PLS

Link to comment
Share on other sites

5 odpovědí na tuto otázku

Recommended Posts

  • 0
  • Globální moderátor

if (IsPlayerInRangeOfPoint(playerid,10,2277.4102,1941.3801,59.6232))
{
     new string[128];
     format(string,sizeof(string),"%s dal kôš !!!",PlayerName(playerid));
     GameTextForAll(string,3000,3);
}

 

jen dej tohle do toho publicu OnPlayerPickupPickup a tamten zrus...

Link to comment
Share on other sites

  • 0

public OnPlayerPickUpPickup(playerid, pickupid)
{
if (IsPlayerInRangeOfPoint(playerid,10,2277.4102,1941.3801,59.6232)){
	new string[128];
	format(string,sizeof(string),"%s dal kôš !!!",PlayerName(playerid));
	GameTextForAll(string,3000,3);
}
return 1;
}

nefunguje ani takto

Link to comment
Share on other sites

  • 0

Problém je v tom že public kos není ničím vyvolaný... povedzme keby si dal do OnPlayerUpdate

kos(playerid);

 

Zaťaží mód ale akcia sa bude vyvolávať. Alebo vytvor timer 1 sekundový čo ti bude spúštať akciu. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...