09.09.2013, 10:50
well i am doing a house script but when i use /entrar i cannot enter
CMD:entrar(playerid,params[])
{
new pName[24];
for(new i = 0; i < MAX_CASAS;i++)
{
if(!IsPlayerInRangeOfPoint(playerid,8.0,CInfo[i][entradax],CInfo[entraday][entraday],CInfo[i][entradaz])) continue;
GetPlayerName(playerid,pName,24);//Storing the players name
if(CInfo[i][nomedacasa] == 1 && strcmp(CInfo[i][nomedacasa],pName) == 0)//String comparing between the players name and the house owners name, to check if they match.
SetPVarInt(playerid,"PlayersInteriorHouse",GetPlay erInterior(playerid));//Storing, so later we can reset it back
SetPVarInt(playerid,"PlayerVirtualWorldHouse",GetP layerVirtualWorld(playerid));//Storing, so later we can reset it back
SetPlayerInterior(playerid,12);//Setting the players interior.
SetPlayerPos(playerid,446.7281,507.0475,1001.4195) ;//Setting the players position.
SetPlayerVirtualWorld(playerid,CInfo[i][vw]);//Preventing players from different houses, finding each other.
return 1;
}
SendClientMessage(playerid,-1,"You aren't near a house!");
return 1;
}
can you help? it always saying "you arent near a house" but i am really close.
thanks if you helped me
CMD:entrar(playerid,params[])
{
new pName[24];
for(new i = 0; i < MAX_CASAS;i++)
{
if(!IsPlayerInRangeOfPoint(playerid,8.0,CInfo[i][entradax],CInfo[entraday][entraday],CInfo[i][entradaz])) continue;
GetPlayerName(playerid,pName,24);//Storing the players name
if(CInfo[i][nomedacasa] == 1 && strcmp(CInfo[i][nomedacasa],pName) == 0)//String comparing between the players name and the house owners name, to check if they match.
SetPVarInt(playerid,"PlayersInteriorHouse",GetPlay erInterior(playerid));//Storing, so later we can reset it back
SetPVarInt(playerid,"PlayerVirtualWorldHouse",GetP layerVirtualWorld(playerid));//Storing, so later we can reset it back
SetPlayerInterior(playerid,12);//Setting the players interior.
SetPlayerPos(playerid,446.7281,507.0475,1001.4195) ;//Setting the players position.
SetPlayerVirtualWorld(playerid,CInfo[i][vw]);//Preventing players from different houses, finding each other.
return 1;
}
SendClientMessage(playerid,-1,"You aren't near a house!");
return 1;
}
can you help? it always saying "you arent near a house" but i am really close.
thanks if you helped me