Tematy otagowane jako: powinna
1. Wiadomosc sie wysyla mimo ze nie powinna
Witam, mam tak? komende:
Pawn dcmd_zaladuj ( playerid , params [])
{
#pragma unused params
new vehicleid = GetPlayerVehicleID ( playerid );
new pid = GetVehicleModel ( vehicleid );
if( gGracz [ playerid ][ Towar ] == 0 )
{
if( pid == 482 || pid == 459 || pid == 455 || pid == 456 || pid == 440 || pid == 433 || pid == 414 || pid == 413 )
{
for(new pz ; pz < sizeof ( PunktyZaladunku ); pz ++)
{
if( IsPlayerInRangeOfPoint ( playerid , 10 , PunktyZaladunku [ pz ][ 0 ], PunktyZaladunku [ pz ][ 1 ], PunktyZaladunku [ pz ][ 2 ]))
{
ShowPlayerDialog ( playerid , D_TOWARY , DIALOG_STYLE_LIST , "Zaladunek" , "MlekonPaliwonOlejenJogurty" , "Zaladuj" , "Anuluj" );
}
}
SendClientMessage ( playerid , COLOR_RED , "Nie jestes w punkcie zaladunkowym!" );
}
else
{
SendClientMessage ( playerid , COLOR_RED , "W tym pojezdzie nie mozesz przewozic towarow !" );
}
}
return 1 ;
}
Moim problemem jest, ze po podjechaniu pod marker z zaladunkiem, wczytuje sie dialog z ktorego zaladuje mi sie towar, ale wysyla sie wiadomosc: "Nie jestes w punkcie zaladunkowym". Dlaczego ?
2. [INNE] Komenda nie działa jak powinna
Cze?? mam problem z komend?. Poniewa? gdy wpisuje /zmien_frakcja to nic si? nie dzieje. Prosz? o pomoc.
Kod:
Kod: CMD:zmien_frakcja(playerid, params[])
{
if(IsPlayerAdmin(playerid)){
new string[300];
new id;
new frakcja;
new Gname[MAX_PLAYER_NAME];
GetPlayerName(playerid, Gname, sizeof(Gname));
format(string, sizeof(string), "/Gracze/%s.txt",Gname);
if(dini_Exists(string))
{
if(sscanf(params, "ui", id, frakcja))
{
SendClientMessage(playerid, COLOR_WHITE, "U?yj /zmien_frakcja [IDGRACZA] [FRAKCJA]");
return 1;
}
else if(id == INVALID_PLAYER_ID)
{
SendClientMessage(playerid, COLOR_RED, "Gracz nie istnieje !");
return 1;
}
else if(gGracz[id][Frakcja] == frakcja)
{
SendClientMessage(playerid, COLOR_RED, "Gracz ma juz ta frakcje !");
return 1;
}
else
{
new message[64];
gGracz[id][Frakcja] = frakcja;
dini_IntSet(string, "Frakcja", gGracz[id][Frakcja]);
format(message,sizeof(message),"Zatrudniles gracza do %s",frakcja);
SendClientMessage(playerid,COLOR_GREEN,message);
format(message,sizeof(message),"Zostales zatrudniony do %s !n{FFFFFF}Powodzenia ",frakcja);
SendClientMessage(id,COLOR_RED,message);
}
}
}
return 1;
}