Hi,
Gibts auch ne andere Möglichkeit, als einen Timer? Hab hier n Beispiel und dort is es ohne
Schau mal:
if(!strcmp(cmdtext, "/stop", true)) //Stop der Plattform { if(GetLabCoverState() == COVER_STATE_STILL) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Plattform bewegt sich nicht!"); StopLabCover(); if(openlab == true) openlab = false; else openlab = true; return 1; } return 0;}
public OnObjectMoved(objectid){ if(objectid == LABROOF) { #if USE_SOUND == true for(new i=0; i<MAX_PLAY; i++) PlayerPlaySound(i,1154 ,268.350677, 1883.572875, 16.076126); //Closed sound #endif moving = COVER_STATE_STILL; //Object is not moving } return 1;
Sorry, der Pawn Code wird net richtig angezeigt. Hier ohne:
if(!strcmp(cmdtext, "/stop", true)) //Stop der Plattform
{
if(GetLabCoverState() == COVER_STATE_STILL) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: Plattform bewegt sich nicht!");
StopLabCover();
if(openlab == true) openlab = false;
else openlab = true;
return 1;
}
return 0;
}
public OnObjectMoved(objectid)
{
if(objectid == LABROOF)
{
#if USE_SOUND == true
for(new i=0; i<MAX_PLAY; i++) PlayerPlaySound(i,1154 ,268.350677, 1883.572875, 16.076126); //Closed sound
#endif
moving = COVER_STATE_STILL; //Object is not moving
}
return 1;
