public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(henter, 6, cmdtext); //da wo die 6 steht, muss die länge des Commandes (henter == 6 Zeichen)
dcmd(hexit, 5, cmdtext); //da wo die 5 steht, muss die länge des Commandes (hexit == 5 Zeichen)
return SendClientMessage(playerid, 0xAA3333AA, "Diesen Befehl gibt es nicht!");
}
dcmd_henter(playerid,params[])
{
#pragma unused params
if(IsPlayerConnected(playerid))
{
for(new h = 0; h <= MAX_HOUSES; h++)
{
if(PlayerToPoint(PTP_RADIUS, playerid, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ]))
{
new Level = HouseInfo[h][hLevel];
if(HouseInfo[h][hLocked] == 1 && strcmp(HouseInfo[h][hName],GetName(playerid), false ) != 0) return SendClientMessage(playerid, COLOR_GREY, "Dieses Haus wurde durch den Besitzer verschlossen");
SetPlayerPos(playerid, HousesCoords[Level][0], HousesCoords[Level][1], HousesCoords[Level][2]);
SetPlayerInterior(playerid, HousesLevels[Level][0]); SetPlayerVirtualWorld(playerid, HouseInfo[h][hVirtualWorld]);
}
}
}
return 1;
}
dcmd_hexit(playerid,params[])
{
#pragma unused params
if(IsPlayerConnected(playerid))
{
for(new h = 0; h <= MAX_HOUSES; h++)
{
if(PlayerToPoint(PTP_RADIUS, playerid, HousesCoords[HouseInfo[h][hLevel]][0], HousesCoords[HouseInfo[h][hLevel]][1], HousesCoords[HouseInfo[h][hLevel]][2]))
{
SetPlayerPos(playerid, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ]);
SetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, 0);
}
}
}
return 1;
}
Probier's mal so
MfG
Maxx