GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: instant - 2012. július 17. - 16:52:56

Cím: Nem küldi az üzenetet a taxisnak
Írta: instant - 2012. július 17. - 16:52:56
Üdv , az lenne a problémám hogy átformáltam a Taxi hivást de nem küldi el az üzenetet
Kód :
 

CMD:taxicall(playerid,params[])
{
if(GetPVarInt(playerid,\"Taxis\")) return SendClientMessage(playerid,COLOR_RED,\"Taxis vagy nem hivhatsz taxit !\");
format(string2,sizeof(string2),\"%s Taxit hivott!\",pName(playerid));
UzenetTaxisnak(COLOR_BLUE,string2);
new Float:x, Float:y, Float:z;
//Lekéred a játékos pozícióját egy változóba eltárolod
GetPlayerPos(playerid, x, y, z);
//A checkpointot létrehozod a taxisnak, a pozíciót pedig a változóból olvasod ki
SetPlayerMapIcon(playerid,56,x,y,z,0,-1,MAPICON_LOCAL);
return 1;
}
forward UzenetTaxisnak(color,const string[]);
public UzenetTaxisnak(color,const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) == 1) if (GetPVarInt(i,\"Taxis\") == 1) SendClientMessage(i,color,string2);
}
return 1;
}
Cím: Nem küldi az üzenetet a taxisnak
Írta: Norby - 2012. július 17. - 16:55:03
CMD:taxicall(playerid,params[])
{
if(GetPVarInt(playerid,\"Taxis\")) return SendClientMessage(playerid,COLOR_RED,\"Taxis vagy nem hivhatsz taxit !\");
format(string2,sizeof(string2),\"%s Taxit hivott!\",pName(playerid));
UzenetTaxisnak(COLOR_BLUE,string2);
new Float:x, Float:y, Float:z;
//Lekéred a játékos pozícióját egy változóba eltárolod
GetPlayerPos(playerid, x, y, z);
//A checkpointot létrehozod a taxisnak, a pozíciót pedig a változóból olvasod ki
SetPlayerMapIcon(playerid,56,x,y,z,0,-1,MAPICON_LOCAL);
return 1;
}
forward UzenetTaxisnak(color[],const string[]);
public UzenetTaxisnak(color[],const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(GetPVarInt(i,\"Taxis\") == 1) SendClientMessage(i,color,string);
}
return 1;
}

 
Próbáld így.
Cím: Nem küldi az üzenetet a taxisnak
Írta: instant - 2012. július 17. - 17:00:13
mindig ugyanaz
Cím: Nem küldi az üzenetet a taxisnak
Írta: Norby - 2012. július 17. - 17:04:05
CMD:taxicall(playerid,params[])
{
if(GetPVarInt(playerid,\"Taxis\")) return SendClientMessage(playerid,COLOR_RED,\"Taxis vagy nem hivhatsz taxit !\");
format(string2,sizeof(string2),\"%s Taxit hivott!\",pName(playerid));
UzenetTaxisnak(COLOR_BLUE,string2);
new Float:x, Float:y, Float:z;
//Lekéred a játékos pozícióját egy változóba eltárolod
GetPlayerPos(playerid, x, y, z);
//A checkpointot létrehozod a taxisnak, a pozíciót pedig a változóból olvasod ki
SetPlayerMapIcon(playerid,56,x,y,z,0,-1,MAPICON_LOCAL);
return 1;
}
forward UzenetTaxisnak(color[],const string[]);
public UzenetTaxisnak(color[],const string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(GetPVarInt(i,\"Taxis\") == 1) SendClientMessage(i,color,string);
}
return 1;
}
Cím: Nem küldi az üzenetet a taxisnak
Írta: instant - 2012. július 17. - 17:20:29
mindig azt csinálja