Hy forumtársak.
Van egy-két probémám amit igy a nap folyamán sikerült összeszednem.
elsõ :
wikin van fent egy parancs:
http://wiki.sa-mp.com/wiki/Dcmditt a \"using strtok\" -os rész.
nos én felhasználtam ugyanazt szinte. 2 modositással, hogy nem azt a szöveget irja ki, és
nem ad életet hanem éppen elvesz. nos, még strcmp-s ilyen \"/parancs [dolog]\" szerkezetû
parancsot még nem alkottam, csak dcmd-vel ami ugyebár könnyebb de nema legkorszerûbb.
kérdésem igy ez alapján hogy mért nem megy a parancs? beirom h /heal vagymi.. erre tölem
veszi le a cuccokat. beirom hogy /heal 0 vagy 1 vagy ami az id-m akkormeg teljesen más
unknown command jön ki.
ez az egyik gondom.. másik:
if (strcmp(cmdtext, \"/garázsba\", true) == 0)
{
new kocsi = GetPlayerVehicleID (playerid);
if (IsPlayerInRangeOfPoint (playerid, 3.0, 298.4709, -1183.6532, 80.6338))//Barage1
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 100);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 1643.839843, -1514.819580, 13.566620);
SetVehicleVirtualWorld(kocsi, 100);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 100);
SetPlayerInterior(playerid, 0);
return 1;
}
}
else if (IsPlayerInRangeOfPoint (playerid, 3.0, 294.4037,-1179.5383,80.6355))//Barage2
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 101);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 1643.839843, -1514.819580, 13.566620);
SetVehicleVirtualWorld(kocsi, 101);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 101);
SetPlayerInterior(playerid, 0);
return 1;
}
}
else if (IsPlayerInRangeOfPoint (playerid, 3.0, 286.3859,-1171.3230,80.6324))//Barage3
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 102);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 1643.839843, -1514.819580, 13.566620);
SetVehicleVirtualWorld(kocsi, 102);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 102);
SetPlayerInterior(playerid, 0);
return 1;
}
}
else if (IsPlayerInRangeOfPoint (playerid, 3.0, 282.3610,-1167.1552,80.6334))//Barage4
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 103);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 1643.839843, -1514.819580, 13.566620);
SetVehicleVirtualWorld(kocsi, 103);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 103);
SetPlayerInterior(playerid, 0);
return 1;
}
}
else if (IsPlayerInRangeOfPoint (playerid, 3.0, 282.4193,-1159.9908,80.6348))//Barage5
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 104);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 1643.839843, -1514.819580, 13.566620);
SetVehicleVirtualWorld(kocsi, 104);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 104);
SetPlayerInterior(playerid, 0);
return 1;
}
}
else if (IsPlayerInRangeOfPoint (playerid, 3.0, 286.6111,-1155.9258,80.6307))//Barage6
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 105);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 1643.839843, -1514.819580, 13.566620);
SetVehicleVirtualWorld(kocsi, 105);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid, 1643.839843, -1514.819580, 13.566620);
SetPlayerVirtualWorld(playerid, 105);
SetPlayerInterior(playerid, 0);
return 1;
}
}
return 1;
}
if (strcmp(cmdtext, \"/garázski\", true) == 0)
{
new kocsi = GetPlayerVehicleID(playerid);
if (IsPlayerInRangeOfPoint (playerid, 5.0, 1643.839843, -1514.819580, 13.566620))//Barage1 (bent)
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 298.4709, -1183.6532, 80.6338);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 298.4709,-1183.6532,80.6338);
SetVehicleVirtualWorld(kocsi, 0);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid, 298.4709, -1183.6532, 80.6338);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
else if (IsPlayerInRangeOfPoint (playerid, 5.0, 1643.839843, -1514.819580, 13.566620))//Barage2 (bent)
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 298.4709, -1183.6532, 80.6338);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 294.4037,-1179.5383,80.6355);
SetVehicleVirtualWorld(kocsi, 0);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid, 294.4037,-1179.5383,80.6355);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
else if (IsPlayerInRangeOfPoint (playerid, 5.0, 1643.839843, -1514.819580, 13.566620))//Barage3 (bent)
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 298.4709, -1183.6532, 80.6338);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 286.3859,-1171.3230,80.6324);
SetVehicleVirtualWorld(kocsi, 0);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid, 286.3859,-1171.3230,80.6324);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
else if (IsPlayerInRangeOfPoint (playerid, 5.0, 1643.839843, -1514.819580, 13.566620))//Barage4 (bent)
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 298.4709, -1183.6532, 80.6338);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 282.3610,-1167.1552,80.6334);
SetVehicleVirtualWorld(kocsi, 0);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid, 282.3610,-1167.1552,80.6334);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
else if (IsPlayerInRangeOfPoint (playerid, 5.0, 1643.839843, -1514.819580, 13.566620))//Barage5 (bent)
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 298.4709, -1183.6532, 80.6338);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 282.4193,-1159.9908,80.6348);
SetVehicleVirtualWorld(kocsi, 0);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid,282.4193,-1159.9908,80.6348);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
return 1;
}
}
else if (IsPlayerInRangeOfPoint (playerid, 5.0, 1643.839843, -1514.819580, 13.566620))//Barage6 (bent)
{
if (IsPlayerInVehicle (playerid, kocsi))
{
//SetPlayerPos(playerid, 298.4709, -1183.6532, 80.6338);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
SetVehiclePos(kocsi, 286.6111,-1155.9258,80.6307);
SetVehicleVirtualWorld(kocsi, 0);
LinkVehicleToInterior(kocsi, 0);
return 1;
}
else
{
SetPlayerPos(playerid, 286.6111,-1155.9258,80.6307);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
}
}
return 1;
}
részben, parancsban mint láthatjátok
egy interiorba lehet több helyen bemenni. nos
ebben az a szép és jo hogy berak az interiorba meg minden
csak kimenetelnél mindig a legelsõ a Garage1hoz rak ki. pedig a \"kirakási\"
koordik nem egyeznek meg ugyebár..
hát most jo sok help kérésem van, aki tud kérem segitsen :\\
haladó scripterként lesüllyedtem erre a szintre, hogy általam eddig
nem használt formák(gondolok itt az strcmp-s parancsra) teljesen ismeretlenek
lettek számomra :\\
elõre is köszi a segitõ szándékot és a segitségeket!
zsomaa