House's interior doesn't show up - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: House's interior doesn't show up (
/showthread.php?tid=633569)
House's interior doesn't show up -
mrcakke - 03.05.2017
Like in the title when i use my cmd to enter house i am in the air and i am falling down from the sky interior is good
"wejdz" is enter cmd and "wyjdz" is to get out cmd i don't have any errors when compiling i don't know what is not good with that
pastebin cmd's:
https://pastebin.com/STT1uZFz
Re: House's interior doesn't show up -
aoky - 03.05.2017
Why are you doing this?
PHP код:
SendClientMessage(playerid, -1, ""COLOR_RED"Nie wszedles do domu");
and not this
PHP код:
SendClientMessage(playerid, -1, COLOR_RED, "Nie wszedles do domu");
And try this:
PHP код:
CMD:wejdz(playerid,params[])
{
new hID = GetHouseOutID(playerid);
if(hID == -255)
{
SendClientMessage(playerid, -1, ""COLOR_RED"Nie jestes w poblizu domu");
}
else {
if(House[hID][hOwned] == 0)
{
SendClientMessage(playerid, -1, ""COLOR_RED"Nie mozesz wejsc do domu bez wlasciciela komenda wejdz");
}
else {
new name[24];
GetPlayerName(playerid,name,24);
if(!strcmp(House[hID][hOwner],name,false))
{
goto somewhere;
}
else if(House[hID][hLocked] == 1)
{
SendClientMessage(playerid, -1, ""COLOR_RED"Nie mozesz wejsc do domu jest zamkniety");
}
somewhere:
SetPlayerInterior(playerid, House[hID][hInInt]);
SetPlayerVirtualWorld(playerid, House[hID][hInVW]);
SetPlayerPos(playerid, House[hID][hInX], House[hID][hInY], House[hID][hInZ]);
}
}
return 1;
}
CMD:wyjdz(playerid,params[])
{
new hID = GetHouseInID(playerid);
if(hID == -255)
{
SendClientMessage(playerid, -1, ""COLOR_RED"Nie wszedles do domu");
return 1;
}
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
SetPlayerPos(playerid,House[hID][hOutX],House[hID][hOutY],House[hID][hOutZ]);
return 1;
}
Re: House's interior doesn't show up -
mrcakke - 03.05.2017
i know what i am doing
i know i can do this without returns :V i know that i can do it better but maybe you don't know pawn and SendClientMessage doesn't have so much argument to do it how to do it right? SendClientMessage(playerid,color,const message[]);
Edit:Okey i solved this