What is wrong with this cmd? - 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: What is wrong with this cmd? (
/showthread.php?tid=441818)
What is wrong with this cmd? -
RedWolfX - 04.06.2013
Hello, I am trying to make a buildhouse command, But I get alot of errors when trying to compile.
Код:
CMD:buildtent(playerid, params[])
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
for(new i = 0; i < MAX_HOUSES; i++)
{
if(IsPlayerInRangeOfPoint(playerid, 1.5, HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ]) && GetPlayerInterior(playerid) == HouseInfo[i][hOutsideInt] && GetPlayerVirtualWorld(playerid) == HouseInfo[i][hOutsideVir])
{
if(HouseInfo[i][hOwned]) return SendClientMessage(playerid, COLOR_RED, "");
if(playerInfo[playerid][pCash] < 30) return SendClientMessage(playerid, "");
{
HouseInfo[i][hOwned] = true;
strmid(HouseInfo[i][hOwner], pName, 0, false, strlen(pName));
PlayerInfo[playerid][pCash] = -HouseInfo[i][hPrice]);
SaveHouse(i);
LoadHouseVisual(i, true);
return 1;
}
}
return 1;
}
}
Compiles fine without it.
Anyone know whats wrong
Re: What is wrong with this cmd? -
RedWolfX - 04.06.2013
nvm, solved